home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Reference / the cmsp digests ('94-'97) / csmp digest Vol 4 No 030 < prev    next >
Text File  |  1997-01-02  |  134KB  |  4,137 lines

  1. C.S.M.P. Digest             Sat, 21 Dec 96       Volume 4 : Issue 30
  2.  
  3. Today's Topics:
  4.  
  5.         A better way to get a window's current position??
  6.         Alpha Editor - Tcl Engine?
  7.         AppleEvent-Script example
  8.         AppleScript "character count"
  9.         GameWerks question
  10.         Getting a unique ID for a Mac
  11.         Getting name field from an FSSpec
  12.         Is this a MacOS disk cache bug?
  13.         LEX and YACC on the Mac
  14.         MacsBug - Memory
  15.         Open Tranport: Why no T_CONNECT signal?
  16.         PBHGetVInfo return the wrong number of items in a root directory?
  17.         Put file without Dialog Box
  18.         Question about "The Debugger"
  19.         QuickTime Musical Instruments?
  20.         Screen Redrawing Command Wanted
  21.         Scrolling
  22.         Sound Input Manager
  23.         SpriteWorld 2
  24.         Symantec C++ fstreams write unreadable files
  25.         Unlocking a Volume
  26.         Utility pattern?
  27.         [Q] C++ and handles
  28.         [Q] Convert double to string in C. How?
  29.         [Q] Rebooting from MacsBug
  30.         [Q] Setting the cursor location?
  31.         [Q] Time of last key down?
  32.         [Q] disposing handles to structs
  33.         [Q] library-class library for easier MacOS programming?
  34.         [Q]:  Patching _Launch?
  35.         [Q]: recovering mac stuffit archive with NDD 3.1 ?
  36.         code for Async File Output
  37.  
  38.  
  39.  
  40. The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
  41. (marka@ee.mcgill.ca).
  42.  
  43. The digest is a collection of article threads from the internet
  44. newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
  45. csmp.games. It is designed for people who read news semi-regularly and
  46. want an archive of the discussions.  If you don't know what a
  47. newsgroup is, you probably don't have access to it. Ask your systems
  48. administrator(s) for details. If you don't have access to news, you
  49. may still be able to post messages to the group by using a mail server
  50. like anon.penet.fi (mail help@anon.penet.fi for more information).
  51.  
  52. Each issue of the digest contains one or more sets of articles (called
  53. threads), with each set corresponding to a 'discussion' of a particular
  54. subject.  The articles are not edited; all articles included in this digest
  55. are in their original posted form (as received by our news server at
  56. ee.mcgill.ca).  Article threads are not added to the digest until the last
  57. article added to the thread is at least two weeks old (this is to ensure that
  58. the thread is dead before adding it to the digest).  Article threads that
  59. consist of only one message are generally not included in the digest.
  60.  
  61. The digests can be obtained by email, ftp or through the World Wide Web.
  62.  
  63. If you want to receive the digest by mail, send email to 
  64. majordomo@ee.mcgill.ca with no subject and one of the following commands
  65. as body:
  66.  
  67.     help                        Sends you a summary of commands
  68.     subscribe csmp                      Adds you to the mailing list
  69.     unsubscribe csmp                    Removes you from the list
  70.  
  71. Once you have subscribed, you will automatically receive each new
  72. issue as it is created.
  73.  
  74. Back issues are available by ftp from Info-Mac mirror sites in the
  75. per/csmp subdirectory, e.g.
  76.  
  77.   ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
  78.  
  79. The contents of all back issues can be searched by accessing the
  80. following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
  81.  
  82.     http://marvin.stattech.com.au/search.html
  83.  
  84. They can also be searched through the following URLs, thanks to
  85. Tim Tuck (Tim.Tuck@sensei.com.au):
  86.  
  87.     http://wais.sensei.com.au/searchform.html
  88.     wais://wais.sensei.com.au:210/csmp?
  89.  
  90. -------------------------------------------------------
  91.  
  92. >From slur@world.std.com (Scott Lahteine)
  93. Subject: A better way to get a window's current position??
  94. Date: Wed, 4 Dec 1996 16:17:40 GMT
  95. Organization: Hot Eggs
  96.  
  97.  
  98. Is there a more elegant way to get the current position of a window? 
  99. Here's the code I'm using:
  100.  
  101. pWindRec->lastPoint =
  102. *(Point*)&(**((WindowPeek)pWindow)->contRgn).rgnBBox.top;
  103.  
  104. 1. Cast GrafPtr to WindowPeek
  105. 2. Dereference the RgnHandle for the content region
  106. 3. Get the address of the rgnBBox.top (=topLeft) field
  107. 4. Cast the result as a Point Pointer
  108. 5. Dereference the pointer to get the topLeft point
  109.  
  110. My CodeWarrior 8 won't allow the simpler:
  111.  
  112. pWindRec->lastPoint =
  113. (**((WindowPeek)pWindow)->contRgn).rgnBBox.topLeft;
  114.  
  115. The error comes down to: "topLeft is not a struct member"
  116. -- 
  117. - scott                             slur@world.std.com
  118.  
  119.        "A painting of a rice cake does not satisfy hunger."
  120.  
  121. +++++++++++++++++++++++++++
  122.  
  123. >From johns@efn.org (Johnny Selhorst)
  124. Date: Wed, 04 Dec 1996 09:25:50 -0800
  125. Organization: Just me
  126.  
  127. In article <slur-ya023480000412961117400001@news.std.com>,
  128. slur@world.std.com (Scott Lahteine) wrote:
  129.  
  130. >Is there a more elegant way to get the current position of a window? 
  131. >Here's the code I'm using:
  132. >
  133. >pWindRec->lastPoint =
  134. >*(Point*)&(**((WindowPeek)pWindow)->contRgn).rgnBBox.top;
  135. >
  136. >1. Cast GrafPtr to WindowPeek
  137. >2. Dereference the RgnHandle for the content region
  138. >3. Get the address of the rgnBBox.top (=topLeft) field
  139. >4. Cast the result as a Point Pointer
  140. >5. Dereference the pointer to get the topLeft point
  141. >
  142. >My CodeWarrior 8 won't allow the simpler:
  143. >
  144. >pWindRec->lastPoint =
  145. >(**((WindowPeek)pWindow)->contRgn).rgnBBox.topLeft;
  146. >
  147. >The error comes down to: "topLeft is not a struct member"
  148.  
  149. How about this:
  150.  
  151. Point origin = {0, 0};
  152. SetPort(pWindow);
  153. LocalToGlobal(&origin);
  154.  
  155. Much cleaner.
  156.  
  157. Johnny
  158.  
  159. +++++++++++++++++++++++++++
  160.  
  161. >From magao@zip.com.au (Timothy C. Delaney)
  162. Date: Thu, 05 Dec 1996 06:37:48 +1100
  163. Organization: The Zipsters
  164.  
  165. In article <johns-ya023060030412960925500001@news.efn.org>, johns@efn.org
  166. (Johnny Selhorst) wrote:
  167.  
  168. > How about this:
  169. > Point origin = {0, 0};
  170. > SetPort(pWindow);
  171. > LocalToGlobal(&origin);
  172.  
  173. A "better" way is to not assume that the origin is (0, 0) - so use the top
  174. left corner of the port rect.
  175.  
  176. Point   origin  = { pWindow->portRect.top, pWindow->portRect.left };
  177. SetPort(pWindow);
  178. LocalToGlobal(&origin);
  179.  
  180. Note - this would be slower than the original code which accessed the
  181. content region.
  182.  
  183. -- 
  184. <http://www.zip.com.au/~magao/standard_disclaimer.html>
  185.  
  186.                                        _/_/_/_/
  187.    __|  __|        _/_|     _/_/_/      _/_|     _/_/_/
  188.   _/_| _/_|      _/  _|   _/          _/  _|   _/    _/
  189.  -/ _|_/ _|    _/_/_/_|  _/ _/_/_/  _/_/_/_|  _/    _/
  190. _/  __/  _|  _/      _|  _/_/_/   _/      _|  _/_/_/
  191.  
  192. Tim Delaney                            magao@zip.com.au
  193.  Mac/Windows SW Engineer, Bold        magao@bold.com.au
  194.  
  195. +++++++++++++++++++++++++++
  196.  
  197. >From spamwall@zercom.net (Martin-Gilles Lavoie)
  198. Date: 5 Dec 1996 13:33:23 GMT
  199. Organization: Groupimage, inc.
  200.  
  201. In article <johns-ya023060030412960925500001@news.efn.org>, johns@efn.org
  202. (Johnny Selhorst) wrote:
  203.  
  204. > In article <slur-ya023480000412961117400001@news.std.com>,
  205. > slur@world.std.com (Scott Lahteine) wrote:
  206.  
  207. [...]
  208. > How about this:
  209. > Point origin = {0, 0};
  210. > SetPort(pWindow);
  211. > LocalToGlobal(&origin);
  212. > Much cleaner.
  213.  
  214. Cleaner yes, but does not solve the problem.  The above code does not take
  215. into account the thickness of the window border, and it's title bar (if
  216. any).
  217. =================================================================
  218. Please reply using the following address, rather than the
  219. "reply-to" address (my mail box is being filled with junk mail).
  220. =================================================================
  221. Martin-Gilles Lavoie  |  Opinions expressed herein are just that.
  222. mouser@zercom.net     |  "No! Do, or do not.  There is no try."
  223. Globimage, inc.       |         --Yoda on error handling
  224.  
  225. +++++++++++++++++++++++++++
  226.  
  227. >From BHuey@worldnet.att.net (Hugh Johnson)
  228. Date: Wed, 04 Dec 1996 21:38:24 -0600
  229. Organization: Semplice
  230.  
  231. In article <slur-ya023480000412961117400001@news.std.com>,
  232. slur@world.std.com (Scott Lahteine) wrote:
  233.  
  234. > Is there a more elegant way to get the current position of a window? 
  235. > Here's the code I'm using:
  236. > pWindRec->lastPoint =
  237. > *(Point*)&(**((WindowPeek)pWindow)->contRgn).rgnBBox.top;
  238.  
  239. #define topLeft(x) (((Point*)&( x ))[0])
  240.  
  241. #define GlobalBBox(aWPtr) ((*(WindowPeek(aWPtr))->strucRgn)->rgnBBox)
  242.  
  243. #define GlobalTopLeft(aWPtr) topLeft(GlobalBBox(aWPtr))
  244.  
  245. ---------------------------
  246.  
  247. >From "Jason M. Smith" <jsmith@es.com>
  248. Subject: Alpha Editor - Tcl Engine?
  249. Date: Wed, 04 Dec 1996 12:58:33 -0700
  250. Organization: Evans & Sutherland
  251.  
  252. Since Alpha allows the creation of new tcl/tk additions to it, I have
  253. to ask... does Alpha use an internal tcl/tk engine?  If so, what tcl/tk
  254. version is supported?  Also, would it be possible for it to use the
  255. System level tcl/tk shared library from Sun, thereby saving disk space?
  256.  
  257. -- 
  258. Jason M. Smith
  259. Software Engineer    1215 S. McClelland St.    600 Komas Dr.
  260. Display Group        Salt Lake, UT 84105    Salt Lake City, UT 84158
  261. Evans & Sutherland    (801) 486-2378 (H)    (801) 588-7552 (W)
  262.  
  263. +++++++++++++++++++++++++++
  264.  
  265. >From vince@deas.harvard.edu (Vince Darley)
  266. Date: Wed, 04 Dec 1996 20:01:04 -0500
  267. Organization: Harvard University
  268.  
  269. In article <32A5D7E9.2781E494@es.com>, "Jason M. Smith" <jsmith@es.com> wrote:
  270.  
  271. >Since Alpha allows the creation of new tcl/tk additions to it, I have
  272. >to ask... does Alpha use an internal tcl/tk engine?  If so, what tcl/tk
  273. >version is supported?  Also, would it be possible for it to use the
  274. >System level tcl/tk shared library from Sun, thereby saving disk space?
  275.  
  276. [Disclaimer: Pete Keleher, author of Alpha, will be able to answer this
  277. question more accurately than I, but these are my impressions from
  278. _extensive_ use, and from some correspondence with Pete]
  279.  
  280. Alpha does use an internal Tcl only engine --- all the graphical features
  281. are coded separately.  It currently uses Tcl7.4.  Pete looked at moving to
  282. tcl7.5, but the added memory footprint dissuaded him (~150k more if I
  283. recall).  I would have thought it could use a system level shared Tcl
  284. library, but that this would involve some minor modifications to the
  285. current Alpha<-->Tcl interaction.  Indeed this would save disk space, and I
  286. think it's a great idea.
  287.  
  288. Also this would ultimately allow Alpha to use Tcl 8.0 and therefore the Tcl
  289. compiler --- which would be a great boon.
  290.  
  291. -- 
  292.     -********* *-
  293.    -*  Vince  *-
  294.   -* *********-
  295.    
  296. <http://www.fas.harvard.edu/~darley/>
  297.  
  298. +++++++++++++++++++++++++++
  299.  
  300. >From rjohnson@Sun.COM (Ray Johnson)
  301. Date: 5 Dec 1996 03:29:15 GMT
  302. Organization: Sun Microsystems Inc., Mountain View, CA
  303.  
  304. Jason M. Smith (jsmith@es.com) wrote:
  305. : Since Alpha allows the creation of new tcl/tk additions to it, I have
  306. : to ask... does Alpha use an internal tcl/tk engine?  If so, what tcl/tk
  307. : version is supported?  Also, would it be possible for it to use the
  308. : System level tcl/tk shared library from Sun, thereby saving disk space?
  309.  
  310. It would certainly be possible.  I'd love to see it.  However, Peter
  311. is a full time prof at UMD which I'm sure imposses a few time constraints
  312. on him.
  313.  
  314. If there are any technical limitations I'd like to know about them.  
  315. The goal of making the Tcl/Tk shared libraries is so developers can
  316. leverage them to make smaller more powerful apps.  Serveral apps are
  317. doing just that...
  318.  
  319. Ray Johnson
  320. http://www.sunlabs.com/people/raymond.johnson/
  321.  
  322.  
  323. ---------------------------
  324.  
  325. >From Rich Allen <hcir@alaska.net>
  326. Subject: AppleEvent-Script example
  327. Date: Sun, 01 Dec 1996 20:23:57 -0900
  328. Organization: Allen ReSearch
  329.  
  330. Example program of sending AppleEvents to AppleScripts, ie. those items
  331. in the Scripting Additons folder.
  332.  
  333. Thanks
  334. -- 
  335.  
  336. Rich & Sue Allen
  337. Allen ReSearch
  338. HC 31 Box 5257
  339. Wasilla AK 99654
  340.  
  341. mailto:hcir@alaska.net
  342. http://www.alaska.net/~hcir/
  343.  
  344. +++++++++++++++++++++++++++
  345.  
  346. >From uzs90z@uni-bonn.de (Michael Schuerig)
  347. Date: Mon, 2 Dec 1996 17:17:07 +0100
  348. Organization: RHRZ - University of Bonn (Germany)
  349.  
  350. Rich Allen <hcir@alaska.net> wrote:
  351.  
  352. > Example program of sending AppleEvents to AppleScripts, ie. those items
  353. > in the Scripting Additons folder.
  354.  
  355. Just send the event to yourself. Look up class ID, event ID and
  356. parameters in the 'aete' resource of the scripting addition. 
  357.  
  358. Scripting Additions (aka osaxen) are installed in the system-wide AE
  359. dispatch table so they're available everywhere (well, better not call
  360. them at interrupt time).
  361.  
  362. Michael
  363.  
  364. - -
  365. Michael Schuerig
  366. mailto:uzs90z@uni-bonn.de
  367. http://www.rhrz.uni-bonn.de/~uzs90z/
  368.  
  369. +++++++++++++++++++++++++++
  370.  
  371. >From mh@primenet.com (Mark Hartman)
  372. Date: 2 Dec 1996 13:20:03 -0700
  373. Organization: Mark Hartman Computer Solutions
  374.  
  375. In article <32A267E5.6952@alaska.net>, hcir@alaska.net wrote:
  376.  
  377. >Example program of sending AppleEvents to AppleScripts, ie. those items
  378. >in the Scripting Additons folder.
  379.  
  380. Those aren't AppleScripts.  They're - amazingly enough - scripting additions,
  381. otherwise known as OSAXen (Open Scripting Architecture eXtensions).   They
  382. add functionality to AppleScripts.
  383. ==========================================================================
  384.   Mark Hartman Computer Solutions - specializing in all things Macintosh
  385.      C  C++   4th Dimension   Networking   System design/architecture
  386.   tel +1(714)758.0640 -+- fax +1(714)999.5030 -+- e-mail mh@primenet.com
  387. ==========================================================================
  388. "Hello, my name is Mark, and I've been Intel-free for 8 years and 2 days."
  389.  
  390. ---------------------------
  391.  
  392. >From trehling@aol.com
  393. Subject: AppleScript "character count"
  394. Date: 2 Dec 1996 10:17:01 GMT
  395. Organization: AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com
  396.  
  397. Hope someone can help!
  398.  
  399. I want to write an AppleScript that counts the characters of a filename
  400. and puts this value into the clipboard.
  401. That's all.
  402. I use the script
  403.  
  404. tell application "Finder"
  405. activate
  406. count the characters of selection
  407. end tell
  408.  
  409. I get this message in the Eventprotokoll
  410.  
  411. "tell application "Finder"
  412.     activate
  413.     count every character of selection
  414.          0
  415. end tell"
  416. What's wrong it is =0
  417. Thank you 
  418. Thorsten
  419.  
  420. +++++++++++++++++++++++++++
  421.  
  422. >From jwbaxter@olympus.net (John W. Baxter)
  423. Date: Mon, 02 Dec 1996 07:38:54 -0800
  424. Organization: Internet for the Olympic Peninsula
  425.  
  426. In article <19961202101801.FAA10175@ladder01.news.aol.com>,
  427. trehling@aol.com wrote:
  428.  
  429. >Hope someone can help!
  430. >
  431. >I want to write an AppleScript that counts the characters of a filename
  432. >and puts this value into the clipboard.
  433. >That's all.
  434. >I use the script
  435. >
  436. >tell application "Finder"
  437. >activate
  438. >count the characters of selection
  439. >end tell
  440. >
  441. >I get this message in the Eventprotokoll
  442. >
  443. >"tell application "Finder"
  444. >        activate
  445. >        count every character of selection
  446. >                 0
  447. >end tell"
  448. >What's wrong it is =0
  449.  
  450. tell application "Finder"
  451.     set temp to name of item 1 of selection
  452. end tell
  453. count of temp
  454.     --> returns 5 when the selection consists of the disk icon "Blake" (my
  455. startup drive)
  456.  
  457. The count of temp statement can be inside or outside the tell block.
  458.  
  459. Finder returns selection as a list of object specifiers (references) of
  460. the items (disks, files, printers, ...) selected, even when there is only
  461. one (some other Finder events aren't that well behaved).
  462.  
  463. A list of object specifiers has no characters (it would appear...I've
  464. never asked that the characters of such a list be counted).
  465.  
  466.    --John
  467.  
  468. -- 
  469.   The primary cause of problems is solutions.
  470. John W. Baxter    Port Ludlow, WA, USA     jwbaxter@olympus.net
  471.  
  472. +++++++++++++++++++++++++++
  473.  
  474. >From mh@primenet.com (Mark Hartman)
  475. Date: 2 Dec 1996 13:33:03 -0700
  476. Organization: Mark Hartman Computer Solutions
  477.  
  478. In article <19961202101801.FAA10175@ladder01.news.aol.com>,
  479. trehling@aol.com wrote:
  480.  
  481. >Hope someone can help!
  482. >
  483. >I want to write an AppleScript that counts the characters of a filename
  484. >and puts this value into the clipboard.
  485. >That's all.
  486. >I use the script
  487. >
  488. >tell application "Finder"
  489. >activate
  490. >count the characters of selection
  491. >end tell
  492.  
  493. The following worked for me:
  494.  
  495. tell application "Finder"
  496.    activate
  497.    copy the name of the selection to a
  498.    count of characters of a
  499. end tell
  500. ========================================================================
  501.  Mark Hartman Computer Solutions - specializing in all things Macintosh
  502.     C  C++   4th Dimension   Networking   System design/architecture
  503.  tel +1(714)758.0640 -+- fax +1(714)999.5030 -+- e-mail mh@primenet.com
  504. ========================================================================
  505. "Success flourishes only in perserverance" - Baron Manfred vonRichthofen
  506.  
  507. +++++++++++++++++++++++++++
  508.  
  509. >From Jackson Software Development <development@jacksoncorp.com>
  510. Date: 3 Dec 1996 15:09:50 GMT
  511. Organization: Jackson Software
  512.  
  513. In article <mh-0212961233310001@ip135.sna.primenet.com> Mark Hartman,
  514. mh@primenet.com writes:
  515. >The following worked for me:
  516. >
  517. >tell application "Finder"
  518. >   activate
  519. >   copy the name of the selection to a
  520. >   count of characters of a
  521. >end tell
  522.  
  523. Is there any reason that people are using a verbose sentence structure
  524. like "count of characters of a" instead of "length of a"? Is there a 
  525. symantic difference, or is it just a style preference?
  526.  
  527. Darrin
  528.  
  529. ---------------------------
  530.  
  531. >From nyrath@clark.net (Nyrath the nearly wise)
  532. Subject: GameWerks question
  533. Date: 26 Nov 1996 14:38:16 GMT
  534. Organization: morthrai.morgoth.web
  535.  
  536. Does GameWerks have wrapper classes for Direct X and Game Sockets
  537. yet?
  538.  
  539. My boss wants me to write a Mac/Windows cross platform game
  540. with internet capability. Direct Play on the Windows side and
  541. Net Sprocket on the Mac side would seem to be a solution if
  542. I can find a x-platform development system that can handle both.
  543.  
  544. Thanks in advance.
  545.  
  546. Winchell Chung
  547.  
  548. +++++++++++++++++++++++++++
  549.  
  550. >From Steve Israelson <steve_israelson@mindlink.net>
  551. Date: Tue, 26 Nov 1996 18:29:40 -0800
  552. Organization: Totally Hip Software
  553.  
  554. Hi,
  555.  
  556. Also, can Gamewerks be compiled on a windows machine using Codewarrior
  557. for windows (beta or whatever)?
  558.  
  559. I need to do crossplatform development with different people working on
  560. each platform on one project?
  561.  
  562. Steve Israelson
  563. Totally Hip Software
  564.  
  565. +++++++++++++++++++++++++++
  566.  
  567. >From MWRon@metrowerks.com (MW Ron)
  568. Date: Tue, 26 Nov 1996 19:04:50 -0500
  569. Organization: Metrowerks
  570.  
  571. In article <57evco$6gb@clarknet.clark.net>, nyrath@clark.net (Nyrath the
  572. nearly wise) wrote:
  573.  
  574. >Does GameWerks have wrapper classes for Direct X and Game Sockets
  575. >yet?
  576. >
  577. >My boss wants me to write a Mac/Windows cross platform game
  578. >with internet capability. Direct Play on the Windows side and
  579. >Net Sprocket on the Mac side would seem to be a solution if
  580. >I can find a x-platform development system that can handle both.
  581.  
  582. We do wrap part of DirectX, but for now we only wrap DirectDraw, and
  583. DrawSprocket, soon we will add Netstuff, but we need to wait for a 3rd
  584. party on this.
  585.  
  586. You might want to note that the next version will have public sourcecode,
  587. just like PP, so users can add their own stuff.
  588.  
  589. Ron
  590.  
  591. -- 
  592. METROWERKS                   Ron Liechty
  593. "Software at Work"    MWRon@metrowerks.com
  594. http://www.metrowerks.com/about/people/rogues.html#mwron
  595.  
  596. +++++++++++++++++++++++++++
  597.  
  598. >From MWRon@metrowerks.com (MW Ron)
  599. Date: Wed, 27 Nov 1996 12:26:34 -0500
  600. Organization: Metrowerks
  601.  
  602. In article <329BA793.34F9@mindlink.net>, Steve Israelson
  603. <steve_israelson@mindlink.net> wrote:
  604.  
  605.  
  606. >Also, can Gamewerks be compiled on a windows machine using Codewarrior
  607. >for windows (beta or whatever)?
  608.  
  609. GameCode and the GameCode Libraries (we've changed their names to
  610. eliminate some confusion) is a cross platform framework and will ship with
  611. the Windows95/NT hosted CodeWarriors.
  612.  
  613. Ron
  614.  
  615. -- 
  616. METROWERKS                   Ron Liechty
  617. "Software at Work"    MWRon@metrowerks.com
  618. http://www.metrowerks.com/about/people/rogues.html#mwron
  619.  
  620. +++++++++++++++++++++++++++
  621.  
  622. >From alexr@bungie.com (Alex Rosenberg)
  623. Date: Sat, 30 Nov 1996 22:01:29 -0600
  624. Organization: Hackers Anonymous
  625.  
  626. In article <57evco$6gb@clarknet.clark.net>, nyrath@clark.net (Nyrath the
  627. nearly wise) wrote:
  628.  
  629. >My boss wants me to write a Mac/Windows cross platform game
  630. >with internet capability. Direct Play on the Windows side and
  631. >Net Sprocket on the Mac side would seem to be a solution if
  632. >I can find a x-platform development system that can handle both.
  633.  
  634. This is *very* important: DirectPlay uses undocumented proprietary
  635. protocols. Any game using it cannot do cross-platform networking. This
  636. means that if you use DirectPlay, you will not be able to connect both Mac
  637. and PC users.
  638.  
  639. My understanding is that Apple is working on a version of NetSprocket for
  640. Win95 to remidy this.
  641.  
  642. - ----------------------------------------------------
  643. |  Alexander M. Rosenberg   <mailto:alexr@bungie.com>|
  644. |  Bungie Software          <http://www.bungie.com>  |
  645. |  Nobody cares what I say.                          |
  646.  
  647. +++++++++++++++++++++++++++
  648.  
  649. >From jgoldshlag@wesleyan.edu (Josh Goldshlag)
  650. Date: Mon, 02 Dec 1996 09:07:07 -0500
  651. Organization: would be cool if I had any.....
  652.  
  653. In article <57evco$6gb@clarknet.clark.net>, nyrath@clark.net (Nyrath the
  654. nearly wise) wrote:
  655.  
  656. > Does GameWerks have wrapper classes for Direct X and Game Sockets
  657. > yet?
  658.  
  659. Excuse my ignorance, but what is GameWerks? It sounds like something
  660. included with CodeWarrior...
  661.  
  662. Josh
  663.  
  664. ---------------------------
  665.  
  666. >From "Joey Edelstein" <joeyhd@netvision.net.il>
  667. Subject: Getting a unique ID for a Mac
  668. Date: 28 Nov 1996 12:02:06 GMT
  669. Organization: NetVision LTD.
  670.  
  671. Hi!  
  672. Is there an established way to get a unique ID for a Mac?  I am responsible
  673. for maintaining an installation program for the Mac.  We would like to be
  674. able to check if this is the same computer a user previously installed
  675. software on or a new one.  If there is no established way to do this can
  676. you suggest one. 
  677. Please reply by Email as well as posting to news grope so I don't miss you
  678. answer.  My news server sometimes plays tricks on me.
  679.     Thank you 
  680.            Joey
  681.     
  682.  
  683. -- 
  684.          \\|//
  685.          (o o)
  686. *****oOOo*( )*oOOo**************************************************
  687.        Joey Edelstein              Email: joeyhd@netvision.net.il   
  688.        Heshev Development Ltd.     
  689.   http://members.tripod.com/~JoeyE   
  690. **************************************************oOOo*( )*oOOo*****
  691.                                                       (o o)
  692.                                                       //|\\
  693.  
  694.  
  695. +++++++++++++++++++++++++++
  696.  
  697. >From blob@ricochet.net
  698. Date: Thu, 28 Nov 1996 11:26:02 -0700
  699. Organization: (none)
  700.  
  701. In article <01bbdd23$8fb94c20$98785ac2@JoeyPc.netvision.net.il>, "Joey
  702. Edelstein" <joeyhd@netvision.net.il> wrote:
  703.  
  704. > Is there an established way to get a unique ID for a Mac? 
  705.  
  706. No. There is no unique ID for a Mac.  There are a couple of things you can
  707. look for on certain Macs.
  708.  
  709. * The Ethernet ID on any Mac with a built-in Ethernet device or a Ethernet
  710. card.  
  711.  
  712. * The serial number of the SCSI or IDE hard disk, if the disk happens to
  713. have one (most SCSI disks don't)
  714.  
  715. That's it.  Neither item applies to a large number of Macs; for instance,
  716. those PowerBooks without built-in Ethernet.
  717.  
  718. There simply isn't a unique ID on the Macintosh.
  719.  
  720. -- 
  721. (Pointers to other Mac programming web sites at
  722. <http://devworld.apple.com/dev/geeks.html>)
  723.  
  724. +++++++++++++++++++++++++++
  725.  
  726. >From krycyb@bergen.org (Krys Cybulski)
  727. Date: Fri, 29 Nov 1996 15:48:24 GMT
  728. Organization: (none)
  729.  
  730. There are a coupl things you could do...
  731.  
  732. For example, you could take a whole bunch of information from the HD, like
  733. when it was formatted, its size, etc. I have no idea how to do this, but
  734. it should be fairly unique per person. Also, a problem with this is that
  735. when the usr changes/reformats the drive, it is going to look different so
  736. it is not fool proof. 
  737.  
  738. -- Krys
  739.  
  740. In article <01bbdd23$8fb94c20$98785ac2@JoeyPc.netvision.net.il>, "Joey
  741. Edelstein" <joeyhd@netvision.net.il> wrote:
  742.  
  743. > Hi!  
  744. > Is there an established way to get a unique ID for a Mac?  I am responsible
  745. > for maintaining an installation program for the Mac.  We would like to be
  746. > able to check if this is the same computer a user previously installed
  747. > software on or a new one.  If there is no established way to do this can
  748. > you suggest one. 
  749. > Please reply by Email as well as posting to news grope so I don't miss you
  750. > answer.  My news server sometimes plays tricks on me.
  751. >         Thank you 
  752. >                Joey
  753. >         
  754. > -- 
  755. >          \\|//
  756. >          (o o)
  757. > *****oOOo*( )*oOOo**************************************************
  758. >        Joey Edelstein              Email: joeyhd@netvision.net.il   
  759. >        Heshev Development Ltd.     
  760. >   http://members.tripod.com/~JoeyE   
  761. > **************************************************oOOo*( )*oOOo*****
  762. >                                                       (o o)
  763. >                                                       //|\\
  764.  
  765. +++++++++++++++++++++++++++
  766.  
  767. >From Chelly Green <chelly@eden.com>
  768. Date: Sun, 01 Dec 1996 17:08:27 -0600
  769. Organization: -
  770.  
  771. Joey Edelstein wrote:
  772. > Hi!
  773. > Is there an established way to get a unique ID for a Mac?
  774.  
  775. What for? Maybe you are asking the wrong question, i.e. getting some
  776. unique identifier is part of your solution. What is the problem?
  777.  
  778. > I am responsible
  779. > for maintaining an installation program for the Mac.  We would like to be
  780. > able to check if this is the same computer a user previously installed
  781. > software on or a new one.
  782.  
  783. For informational purposes? Why do you care if it is the same computer
  784. or a different? What is a "computer"? The motherboard? The hard drive
  785. volume? Both?
  786.  
  787. > If there is no established way to do this can you suggest one.
  788.  
  789. Don't bother. If this has something to do with limiting the use of
  790. software, don't bother. Why limit the use for a customer? Do they have
  791. to go to another company to get rid of dumb limitations intentionally
  792. added?
  793.  
  794. -- 
  795. Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
  796.  
  797.  
  798.  
  799. +++++++++++++++++++++++++++
  800.  
  801. >From mh@primenet.com (Mark Hartman)
  802. Date: 3 Dec 1996 23:53:04 -0700
  803. Organization: Mark Hartman Computer Solutions
  804.  
  805. In article <32A20FCC.6DB3@eden.com>, chelly@eden.com wrote:
  806.  
  807. >Joey Edelstein wrote:
  808. >> 
  809. >> Hi!
  810. >> Is there an established way to get a unique ID for a Mac?
  811. >
  812. >What for? Maybe you are asking the wrong question, i.e. getting some
  813. >unique identifier is part of your solution. What is the problem?
  814. >
  815. >> I am responsible
  816. >> for maintaining an installation program for the Mac.  We would like to be
  817. >> able to check if this is the same computer a user previously installed
  818. >> software on or a new one.
  819. >
  820. >For informational purposes? Why do you care if it is the same computer
  821. >or a different? What is a "computer"? The motherboard? The hard drive
  822. >volume? Both?
  823. >
  824. >> If there is no established way to do this can you suggest one.
  825. >
  826. >Don't bother. If this has something to do with limiting the use of
  827. >software, don't bother. Why limit the use for a customer? Do they have
  828. >to go to another company to get rid of dumb limitations intentionally
  829. >added?
  830.  
  831. Now that Chelly has finished with the soapbox, let me suggest an answer
  832. to the question without the histrionics.
  833.  
  834. Try the Ethernet ID.
  835. ======================================================================
  836. Mark Hartman Computer Solutions - specializing in all things Macintosh
  837.    C  C++   4th Dimension   Networking   System design/architecture
  838. tel +1(714)758.0640 -+- fax +1(714)999.5030 -+- e-mail mh@primenet.com
  839. ======================================================================
  840.  No DIP switches. No CONFIG.SYS. No headaches. No regrets. Macintosh.
  841.  
  842. ---------------------------
  843.  
  844. >From raterwil@ucla.edu (Robert Terwilliger)
  845. Subject: Getting name field from an FSSpec
  846. Date: 26 Nov 1996 23:44:06 GMT
  847. Organization: UCLA Division of Brain Mapping
  848.  
  849. I am trying to get the name field from an FSSpec and am getting errors.  I
  850. am running CW 9 with MW Debug.  I will give an example.
  851.  
  852. The file's name is "b2.buchar" and the FSSpec is *theFile.
  853.  
  854. When I inspect the *theFile using the debugger, I find the name field to
  855. be the following:
  856.  
  857. theFile->name = "/pb2.buchar"
  858.  
  859. which is what I expect, due to the pascal nomenclature.
  860.  
  861. However, if I print the string to the SOUIX console, I get:
  862.  
  863. <the code>
  864.    printf("theFile->name = %s.\n", theFile->name);
  865.  
  866. <the result>
  867.    theFile->name =     b2.bucharbfloat_.
  868.  
  869. which is not what I expect.  I have files on my disk with the suffix
  870. "bfloat" but they are not even on the same directory as "b2.buchar".  Why
  871. am I getting these extra characters attached to the string when they do
  872. not appear when I inspect the code using MW Debug?  I need to pass this
  873. string to another function but cannot do so until I resolve this problem.
  874.  
  875. +++++++++++++++++++++++++++
  876.  
  877. >From matt@colorpar.com (Matt Gieselman)
  878. Date: Tue, 26 Nov 1996 17:40:40 -0800
  879. Organization: The Color Partnership
  880.  
  881. In article <raterwil-2611961544260001@149.142.81.108>, raterwil@ucla.edu
  882. (Robert Terwilliger) wrote:
  883.  
  884. > When I inspect the *theFile using the debugger, I find the name field to
  885. > be the following:
  886. > theFile->name = "/pb2.buchar"
  887. > which is what I expect, due to the pascal nomenclature.
  888. > However, if I print the string to the SOUIX console, I get:
  889. > <the code>
  890. >    printf("theFile->name = %s.\n", theFile->name);
  891. > <the result>
  892. >    theFile->name =     b2.bucharbfloat_.
  893.  
  894. You need to call p2cstr() to convert your Pascal style
  895. string into a C style string.  You can do the conversion
  896. yourself by doing a BlockMove using the first value in
  897. the Pascal string and putting a null character at the
  898. end of the string.
  899.  
  900. So what is happening is printf spits out the string until
  901. it hits a null character, put since the string is Pascal
  902. there isn't a null character.
  903.  
  904. Hope this helps,
  905. Matt
  906.  
  907. - ------------------------------------------------------------
  908. Matt Gieselman  
  909. Software Engineer and Juggler                      
  910. The Color Partnership
  911. matt@colorpar.com
  912. www.colorpar.com
  913. - -----------------------------------------------------------
  914.  
  915. +++++++++++++++++++++++++++
  916.  
  917. >From Carl R. Osterwald <carl_osterwald@nrel.gov>
  918. Date: 27 Nov 1996 17:17:34 GMT
  919. Organization: National Renewable Energy Laboratory
  920.  
  921. In article <matt-2611961740400001@204.253.173.28> Matt Gieselman,
  922. matt@colorpar.com writes:
  923.  
  924. >> However, if I print the string to the SOUIX console, I get:
  925.  
  926. >> <the code>
  927. >>    printf("theFile->name = %s.\n", theFile->name);
  928.  
  929. >> <the result>
  930. >>    theFile->name =     b2.bucharbfloat_.
  931.  
  932. >You need to call p2cstr() to convert your Pascal style
  933. >string into a C style string.
  934.  
  935. Even easier, you can modify the printf() so that it prints a Pascal
  936. string rather than a C string:
  937.  
  938.    printf("theFile->name = %s.\n", theFile->name);
  939.                            ^^ printf assumes it has a C string
  940.  
  941.    printf("theFile->name = %#s.\n", theFile->name);
  942.                            ^^^ printf assumes it has a Pascal string
  943.  
  944. Remember that the standard C I/O does absolutely no type checking and
  945. just blindly forges ahead regardless of whether or not what you give it
  946. is correct.
  947.  
  948. +++++++++++++++++++++++++++
  949.  
  950. >From jpek@genecodes.com (Jeff Pek)
  951. Date: 3 Dec 1996 19:40:04 GMT
  952. Organization: Gene Codes Corp
  953.  
  954. In article <matt-2611961740400001@204.253.173.28>
  955. matt@colorpar.com (Matt Gieselman) writes:
  956.  
  957. > > When I inspect the *theFile using the debugger, I find the name field to
  958. > > be the following:
  959. > > 
  960. > > theFile->name = "/pb2.buchar"
  961. > > 
  962. > > which is what I expect, due to the pascal nomenclature.
  963. > > 
  964. > > However, if I print the string to the SOUIX console, I get:
  965. > > 
  966. > > <the code>
  967. > >    printf("theFile->name = %s.\n", theFile->name);
  968. > > 
  969. > > <the result>
  970. > >    theFile->name =     b2.bucharbfloat_.
  971. > You need to call p2cstr() to convert your Pascal style
  972. > string into a C style string.  You can do the conversion
  973. > yourself by doing a BlockMove using the first value in
  974. > the Pascal string and putting a null character at the
  975. > end of the string.
  976.  
  977. Or just use the %#s format to output the pascal string directly.
  978. Of course this will only work on the Mac.
  979.  
  980. hth - jeff
  981. - ------
  982. Jeff Pek
  983. Development Manager
  984. Gene Codes Corp - Ann Arbor, MI
  985. jpek@genecodes.com
  986.  
  987. +++++++++++++++++++++++++++
  988.  
  989. >From blob@ricochet.NOSPAM.net
  990. Date: Tue, 03 Dec 1996 20:32:01 -0700
  991. Organization: (none)
  992.  
  993. In article <581vmk$plr@kahuna.bizserve.com>, jpek@genecodes.com (Jeff Pek)
  994. wrote:
  995.  
  996. > Or just use the %#s format to output the pascal string directly.
  997.  
  998. To print a pascal string in a compiler independent way using printf, use this:
  999.  
  1000. printf("A Pascal string: %.*s .", inPString[0], &inPString[1]);
  1001.  
  1002. Since a Pascal string has a length byte followed by the data, you can use
  1003. the length byte as the first argument and the data as the second.  The
  1004. first argument tells the second argument how many characters it will be.
  1005.  
  1006. -- 
  1007. (Pointers to other Mac programming web sites at
  1008. <http://devworld.apple.com/dev/geeks.html>)
  1009.  
  1010. To reply personally, remove the anti-spam "NOSPAM." from the email address
  1011. in the header.
  1012.  
  1013. ---------------------------
  1014.  
  1015. >From Tim DeBenedictis <timmyd@best.com>
  1016. Subject: Is this a MacOS disk cache bug?
  1017. Date: Wed, 04 Dec 1996 09:05:14 -0700
  1018. Organization: Best Internet Communications
  1019.  
  1020. Hi everybody-
  1021.  
  1022. I am cross-posting this question to a number of Mac groups because I
  1023. would like to get a better understanding of what is going on, and learn
  1024. if there is in fact a problem.
  1025.  
  1026. Recently, I've discovered that some files which I've saved seem to
  1027. disappear if I have a system crash (or, for that matter, if I just
  1028. simply warm- or cold-reboot the machine, without going thru the "safe"
  1029. shutdown procedure.)  This only happens, tho, if the file I've saved is
  1030. small enough to fit entirely into the disk cache.
  1031.  
  1032. Here's a sequence of steps that will reproduce this problem every time:
  1033.  
  1034. 1) Set your disk cache to 1024K and reboot;
  1035. 2) Launch SimpleText and create a dummy one-sentence text file.
  1036. 3) Select "Save as..." to save the document, hit the OK button, and make
  1037. note of where you saved it.
  1038. 4) Press cmd-ctrl-pwr to reboot the machine (or pull the plug).
  1039. 5) Look where you supposedly saved the SimpleText document.  On my
  1040. machine, the document is gone, every time.
  1041.  
  1042. I do NOT encounter this problem, however, if I open, modify, and save a
  1043. file which is larger than the disk cache.  This leads me to believe that
  1044. somehow chached data is not properly getting written to the drive.  I
  1045. would think that the MacOS disk cache would be designed as a
  1046. "write-though" caching scheme to avoid this sort of problem... if anyone
  1047. knows otherwise, I would appreciate hearing why.
  1048.  
  1049. I am running on a PowerMac 7200/75 with System 7.5.5.  I should note
  1050. that I don't have an Apple hard drive; I'm using a 2GB HP drive
  1051. formatted with FWB's hard disk toolkit software version 1.82.  However,
  1052. I have a friend with a Performa 6208 with an Apple hard drive and Apple
  1053. driver software, and he can reproduce my problem as well.
  1054.  
  1055. Thank you very much, and I'd appreciate hearing your suggestions.  You
  1056. may wish to send e-mail as well as posting, since I do not read all of
  1057. these newsgroups very often.
  1058.  
  1059. -Tim DeBenedictis
  1060. timmyd@best.com
  1061.  
  1062. +++++++++++++++++++++++++++
  1063.  
  1064. >From rdhw@cus.cam.ac.uk (Robin D.H. Walker)
  1065. Date: 4 Dec 1996 17:59:45 GMT
  1066. Organization: Queens' College, U of Cambridge, UK
  1067.  
  1068. In article <32A5A138.1CE4@best.com>, Tim DeBenedictis  <timmyd@best.com> wrote:
  1069.  
  1070. >Recently, I've discovered that some files which I've saved seem to
  1071. >disappear if I have a system crash (or, for that matter, if I just
  1072. >simply warm- or cold-reboot the machine, without going thru the "safe"
  1073. >shutdown procedure.)  This only happens, tho, if the file I've saved is
  1074. >small enough to fit entirely into the disk cache.
  1075.  
  1076. This is perfectly normal behaviour and to be expected.
  1077. The Mac, along with almost every other advanced operating system,
  1078. does not write immediately to hard disk, but defers the write
  1079. and returns to the calling program immediately.  The write is
  1080. deferred on the off-chance that it will be overtaken by another
  1081. write to the same area (often true for directories), and to give
  1082. a quicker return to the calling program.
  1083.  
  1084. Thus it is entirely to be expected that you will lose files if you
  1085. crash or do not go through the correct shut-down procedure.
  1086.  
  1087. -- 
  1088. Robin Walker    (Network Admin), Queens' College, Cambridge, CB3 9ET, GB
  1089. rdhw@cam.ac.uk                 Tel:+44 1223 335528   Fax:+44 1223 335566
  1090.  
  1091. +++++++++++++++++++++++++++
  1092.  
  1093. >From ericb@pobox.com (Eric Bennett)
  1094. Date: 4 Dec 1996 23:15:55 GMT
  1095. Organization: Penn State
  1096.  
  1097. In article <steve-0412961221210001@in243.inetnebr.com>
  1098. steve@mindvision.com (Steve Kiene) writes:
  1099.  
  1100. > Apple's cache is not write through. Data is held in the cache until it is
  1101. > pushed out or someone calls _FlushFile or _FlushVol. The exact same
  1102. > behavior is seen with Speed Doubler, but Speed Doubler 2.0 adds a periodic
  1103. > task to write any dirty blocks in the cache to take care of situations
  1104. > like this. Plus, Speed Doubler (all versions) flush the cache at various
  1105. > places where Apple's cache doesn't. All in the name of safety.  :-)
  1106. > My opinion is that this is first a problem with SimpleText, and second a
  1107. > problem with the OS. Programmers should know that you need to flush your
  1108. > data to guarantee it is on the disk.
  1109.  
  1110. This is not always a bad thing.  I accidentally "overwrote" an
  1111. important file I had been working on a few weeks ago, and I was able to
  1112. recover it by doing a hard reboot since the overwrite was still in
  1113. cache.  :-)
  1114.  
  1115.  
  1116. -- 
  1117. -Eric Bennett ( ericb@pobox.com ; http://www.pobox.com/~ericb )
  1118.  
  1119. I took a speed reading course and read War and Peace in twenty minutes.
  1120.  It involves Russia.
  1121. -Woody Allen
  1122.  
  1123. +++++++++++++++++++++++++++
  1124.  
  1125. >From steve@mindvision.com (Steve Kiene)
  1126. Date: Wed, 04 Dec 1996 12:21:21 -0500
  1127. Organization: MindVision Software
  1128.  
  1129. In article <32A5A138.1CE4@best.com>, timmyd@best.com wrote:
  1130.  
  1131. > Recently, I've discovered that some files which I've saved seem to
  1132. > disappear if I have a system crash (or, for that matter, if I just
  1133. > simply warm- or cold-reboot the machine, without going thru the "safe"
  1134. > shutdown procedure.)  This only happens, tho, if the file I've saved is
  1135. > small enough to fit entirely into the disk cache.
  1136. > Here's a sequence of steps that will reproduce this problem every time:
  1137. > 1) Set your disk cache to 1024K and reboot;
  1138. > 2) Launch SimpleText and create a dummy one-sentence text file.
  1139. > 3) Select "Save as..." to save the document, hit the OK button, and make
  1140. > note of where you saved it.
  1141. > 4) Press cmd-ctrl-pwr to reboot the machine (or pull the plug).
  1142. > 5) Look where you supposedly saved the SimpleText document.  On my
  1143. > machine, the document is gone, every time.
  1144. > I do NOT encounter this problem, however, if I open, modify, and save a
  1145. > file which is larger than the disk cache.  This leads me to believe that
  1146. > somehow chached data is not properly getting written to the drive.  I
  1147. > would think that the MacOS disk cache would be designed as a
  1148. > "write-though" caching scheme to avoid this sort of problem... if anyone
  1149. > knows otherwise, I would appreciate hearing why.
  1150.  
  1151. Apple's cache is not write through. Data is held in the cache until it is
  1152. pushed out or someone calls _FlushFile or _FlushVol. The exact same
  1153. behavior is seen with Speed Doubler, but Speed Doubler 2.0 adds a periodic
  1154. task to write any dirty blocks in the cache to take care of situations
  1155. like this. Plus, Speed Doubler (all versions) flush the cache at various
  1156. places where Apple's cache doesn't. All in the name of safety.  :-)
  1157.  
  1158. My opinion is that this is first a problem with SimpleText, and second a
  1159. problem with the OS. Programmers should know that you need to flush your
  1160. data to guarantee it is on the disk.
  1161.  
  1162. Before anyone jumps up and screams "Why isn't the cache write through",
  1163. consider performance. A true write-though cache would kill performance.
  1164. However, Speed Doubler 2.0 has some nice (IMHO) tricks to get the best of
  1165. both worlds. Caches in the MS-DOS and Windows world are not write through
  1166. either. In fact, they are even more agressive/dangerous than Apple's
  1167. cache.
  1168.  
  1169. Steve Kiene
  1170. MindVision Software
  1171. Co-author of Speed Doubler
  1172.  
  1173. +++++++++++++++++++++++++++
  1174.  
  1175. >From "Eric Schlegel" <ericsc@apple.com>
  1176. Date: 4 Dec 96 23:18:51 -0800
  1177. Organization: Apple Computer, Inc.
  1178.  
  1179. Steve Kiene <steve@mindvision.com> wrote:
  1180. > In article <32A5A138.1CE4@best.com>, timmyd@best.com wrote:
  1181. > > Recently, I've discovered that some files which I've saved seem to
  1182. > > disappear if I have a system crash (or, for that matter, if I just
  1183. > > simply warm- or cold-reboot the machine, without going thru the "safe"
  1184. > > shutdown procedure.)  This only happens, tho, if the file I've saved is
  1185. > > small enough to fit entirely into the disk cache.
  1186. > > 
  1187. > My opinion is that this is first a problem with SimpleText, and second a
  1188. > problem with the OS. Programmers should know that you need to flush your
  1189. > data to guarantee it is on the disk.
  1190.  
  1191. In fact, this *is* a bug in SimpleText. A call to FlushVol was added to the
  1192. sources in July 1996, but that was after the latest released version of
  1193. SimpleText (1.3.1) was built. When SimpleText 1.4 is available you
  1194. shouldn't see this occur any more.
  1195.  
  1196. -eric
  1197. - ---------------------------------------------------------------------
  1198. Eric Schlegel ** High-level Toolbox, Apple Computer ** ericsc@apple.com
  1199.  
  1200.  
  1201.  
  1202.  
  1203. +++++++++++++++++++++++++++
  1204.  
  1205. >From woody@alumni.caltech.edu (William Edward Woody)
  1206. Date: Thu, 05 Dec 1996 02:20:25 -0800
  1207. Organization: In Phase Consulting
  1208.  
  1209. alain@cs.uchicago.edu (Alain Aslag Roy) wrote:
  1210. > rdhw@cam.ac.uk (Robin Walker) wrote:
  1211. > > Tim DeBenedictis  <timmyd@best.com> wrote:
  1212. > > 
  1213. > > >Recently, I've discovered that some files which I've saved seem to
  1214. > > >disappear if I have a system crash (or, 
  1215. > > This is perfectly normal behaviour and to be expected.
  1216. > I suggest that people interested in disk-caches and lost data look at:
  1217. > <http://www.be.com/aboutbe/benewsletter/Issue51.html#Insight>
  1218.  
  1219. While the technique of Journaling is interesting, it only assures that
  1220. the overall structure of the file system is preserved across a crash.
  1221. It does not preserve the integrety of the contents of files whose data
  1222. still hasn't been flushed to the hard disk: that is, the same problem
  1223. being discussed (lost file data) will still exist.
  1224.  
  1225. The short answer is that yes, this is normal behaviour and is to
  1226. be expected. Most high performance systems (including mainframes
  1227. and minis) use a similar cache scheme (in principle) to the
  1228. Macintosh in order to reduce the I/O demand on the hard disk--they get 
  1229. around the problem of insuring file system integrety across a system 
  1230. crash by trying their damnest not to crash. :-)
  1231.  
  1232.                                                 - Bill
  1233.  
  1234. -- 
  1235. William Edward Woody * In Phase Consulting * woody@alumni.caltech.edu
  1236.  
  1237. +++++++++++++++++++++++++++
  1238.  
  1239. >From alain@cs.uchicago.edu (Alain Aslag Roy)
  1240. Date: Thu, 5 Dec 1996 02:22:07 GMT
  1241. Organization: The Anti-Weather Forecasters Coalition
  1242.  
  1243. In article <584e6h$b6@lyra.csx.cam.ac.uk>, rdhw@cam.ac.uk (Robin Walker) wrote:
  1244.  
  1245. > In article <32A5A138.1CE4@best.com>, Tim DeBenedictis  <timmyd@best.com>
  1246. wrote:
  1247. > >Recently, I've discovered that some files which I've saved seem to
  1248. > >disappear if I have a system crash (or, 
  1249.  
  1250. ...
  1251.  
  1252. > This is perfectly normal behaviour and to be expected.
  1253.  
  1254. I suggest that people interested in disk-caches and lost data look at:
  1255.  
  1256. <http://www.be.com/aboutbe/benewsletter/Issue51.html#Insight>
  1257.  
  1258. -alain
  1259.  
  1260. ---------------------------
  1261.  
  1262. >From 100276.1254@compuserve.com
  1263. Subject: LEX and YACC on the Mac
  1264. Date: Sun, 08 Dec 1996 11:21:06 -0600
  1265. Organization: Deja News Usenet Posting Service
  1266.  
  1267. Hi,
  1268.  
  1269. I'm looking for shareware equivalents to LEX and YACC for the Mac.
  1270.  
  1271. Thanks in advance for your help,
  1272. Pierre Bernard.
  1273. - -----------------==== Posted via Deja News ====-----------------------
  1274.       http://www.dejanews.com/     Search, Read, Post to Usenet
  1275.  
  1276. +++++++++++++++++++++++++++
  1277.  
  1278. >From mick@emf.net (Mick Foley)
  1279. Date: 8 Dec 1996 21:13:14 GMT
  1280. Organization: Raindance
  1281.  
  1282. In article <849878715.15989@dejanews.com>, 100276.1254@compuserve.com wrote:
  1283.  
  1284. >Hi,
  1285. >
  1286. >I'm looking for shareware equivalents to LEX and YACC for the Mac.
  1287. >
  1288. >Thanks in advance for your help,
  1289. >Pierre Bernard.
  1290. >-------------------==== Posted via Deja News ====-----------------------
  1291. >      http://www.dejanews.com/     Search, Read, Post to Usenet
  1292.  
  1293. If you are a CodeWarrior person, look in the third party tools folder.
  1294. There are plug in versions of both flex and bison. I've just played around
  1295. a little with them, but they work. The actual "compilers" are FSF stuff -
  1296. no charge. The prefs panels to control them are shareware (about $10 -
  1297. $20).
  1298.  
  1299. Enjoy --
  1300.  
  1301. Mick
  1302.  
  1303. -- 
  1304.  
  1305. - -------------------------------------------------------------------
  1306. Mick Foley                               "Remember, no matter where
  1307. mick@emf.net                               you go, there you are."
  1308. - -------------------------------------------------------------------
  1309.  
  1310. +++++++++++++++++++++++++++
  1311.  
  1312. >From cbarron3@ix.netcom.com
  1313. Date: Sun, 8 Dec 1996 23:54:31 -0500
  1314. Organization: Netcom
  1315.  
  1316. <100276.1254@compuserve.com> wrote:
  1317.  
  1318. > Hi,
  1319. > I'm looking for shareware equivalents to LEX and YACC for the Mac.
  1320. > Thanks in advance for your help,
  1321. > Pierre Bernard.
  1322. > -------------------==== Posted via Deja News ====-----------------------
  1323. >       http://www.dejanews.com/     Search, Read, Post to Usenet
  1324.   There are also drag and drops of flex 2.5.1 and byacc 1.9 someplace in
  1325. the large ftp archives.
  1326.  
  1327. ---------------------------
  1328.  
  1329. >From Mephisto <mwehner@lander.es>
  1330. Subject: MacsBug - Memory
  1331. Date: Wed, 04 Dec 96 22:32:09 -0500
  1332. Organization: Lander Internet
  1333.  
  1334. Hi!
  1335.  
  1336. I just read the MacsBug guide.
  1337. The people there say MacsBug needs about 140k of RAM.
  1338. I however saw in Symbionts (a control panel that shows how much RAM is 
  1339. used up by each control panel/extension) something more like 500-600k!
  1340. That's a little bit more! :)
  1341. I just wanted to know if anyone else has some RAM information about 
  1342. MacsBug 6.5.3
  1343.  
  1344. Thanks!
  1345.  
  1346.     Mephisto (mwehner@lander.es)
  1347.  
  1348. +++++++++++++++++++++++++++
  1349.  
  1350. >From blob@ricochet.NOSPAM.net
  1351. Date: Thu, 05 Dec 1996 07:18:43 -0700
  1352. Organization: (none)
  1353.  
  1354. In article <961204222914-mwehner@lander.es>, mwehner@lander.es wrote:
  1355.  
  1356. > Hi!
  1357. > I just read the MacsBug guide.
  1358. > The people there say MacsBug needs about 140k of RAM.
  1359. > I however saw in Symbionts (a control panel that shows how much RAM is 
  1360. > used up by each control panel/extension) something more like 500-600k!
  1361. > That's a little bit more! :)
  1362.  
  1363. I assume that you mean "MacsBug Reference and Debugging Guide for Macsbug
  1364. version 6.2" published by Addison-Wesley.  Since version 6.2, Macsbug has
  1365. had many features added to it.  Macsbug 6.5.3 now supports the PowerPC
  1366. architecture, has twice has many commands, has extensive help, and other
  1367. improvements.  If Symbionts is reporting 500-600k of RAM being used, it
  1368. isn't lying.
  1369.  
  1370. Macsbug 6.5.3 uses much more RAM than version 6.2, but it also does much
  1371. more.  Unfortunately, there is no way to cut down the memory usage of
  1372. Macsbug by very much.
  1373.  
  1374. -- 
  1375. (Pointers to other Mac programming web sites at
  1376. <http://devworld.apple.com/dev/geeks.html>)
  1377.  
  1378. To reply personally, remove the anti-spam "NOSPAM." from the email address
  1379. in the header.
  1380.  
  1381. +++++++++++++++++++++++++++
  1382.  
  1383. >From jumplong@aol.com
  1384. Date: 7 Dec 1996 03:58:30 GMT
  1385. Organization: AOL http://www.aol.com
  1386.  
  1387. Mephisto wrote:
  1388. >I just read the MacsBug guide. The people there say MacsBug
  1389. >needs about 140k of RAM. I however saw in Symbionts (a control
  1390. >panel that shows how much RAM is  used up by each control
  1391. >panel/extension) something more like 500-600k! That's a little
  1392. >bit more! :) I just wanted to know if anyone else has some RAM
  1393. >information about  MacsBug 6.5.3
  1394.  
  1395. The MacsBug guide was written for MacsBug 6.2. MacsBug 6.5.x does eat
  1396. quite a bit more memory, but it also supports PowerPC Macintosh systems
  1397. and has many, many enhancements beyond what you got in version 6.2.
  1398.  
  1399. How much memory it uses can be reduced some by editing out things you
  1400. don't need with ResEdit. However, you never know what things you'll need
  1401. to debug a crash, so what to remove is a hard decision...
  1402.  
  1403. - Jim Luther
  1404.  
  1405. ---------------------------
  1406.  
  1407. >From ianm@mmcorp.com (Ian McCall)
  1408. Subject: Open Tranport: Why no T_CONNECT signal?
  1409. Date: Fri, 29 Nov 1996 14:18:11 +0000
  1410. Organization: The MultiMedia Corporation
  1411.  
  1412. Hi.
  1413.  
  1414. I'm trying to open an FTP connection using Open Transport. I make the call
  1415. to endPoint->Connect() and it comes back with kOTNoError as expected.
  1416.  
  1417. However, I then expect to get a T_CONNECT signal at some point, and I
  1418. never do. The very first thing that comes back to me is a T_DATA signal,
  1419. with the incoming data being the FTP server's Ready prompt.
  1420.  
  1421. Why is this? Surely I must have successfully opened a connection if I get
  1422. back a ready prompt?
  1423.  
  1424. Any help on this is much appreciated.
  1425.  
  1426.  
  1427. Cheers,
  1428. Ian
  1429.  
  1430. +++++++++++++++++++++++++++
  1431.  
  1432. >From chrisn+@cmu.edu (Chris Newman)
  1433. Date: Mon, 02 Dec 1996 19:37:58 -0800
  1434. Organization: Altopia Corp. - Affordable Usenet Access - http://www.alt.net
  1435.  
  1436. In article <ianm-2911961418110001@194.70.62.242>, ianm@mmcorp.com (Ian
  1437. McCall) wrote:
  1438. >I'm trying to open an FTP connection using Open Transport. I make the call
  1439. >to endPoint->Connect() and it comes back with kOTNoError as expected.
  1440. >
  1441. >However, I then expect to get a T_CONNECT signal at some point, and I
  1442. >never do. The very first thing that comes back to me is a T_DATA signal,
  1443. >with the incoming data being the FTP server's Ready prompt.
  1444. >
  1445. >Why is this? Surely I must have successfully opened a connection if I get
  1446. >back a ready prompt?
  1447.  
  1448. Is your Endpoint in Asynchronous mode?
  1449.  
  1450. +++++++++++++++++++++++++++
  1451.  
  1452. >From ianm@mmcorp.com (Ian McCall)
  1453. Date: Tue, 03 Dec 1996 17:24:58 +0000
  1454. Organization: The MultiMedia Corporation
  1455.  
  1456. > Is your Endpoint in Asynchronous mode?
  1457.  
  1458. Yep.
  1459.  
  1460.  
  1461. Cheers,
  1462. Ian
  1463.  
  1464. ---------------------------
  1465.  
  1466. >From jpurlia@qualcomm.com (John Purlia)
  1467. Subject: PBHGetVInfo return the wrong number of items in a root directory?
  1468. Date: Mon, 25 Nov 1996 11:12:08 -0800
  1469. Organization: QUALCOMM, Inc.
  1470.  
  1471. Can anyone tell me how to easily get the accurate number of items in a
  1472. root directory?  Calling PBHGetVInfo on a volume seems to return only in
  1473. ioVNmFls the number of _files_ in the directory, not the combined number
  1474. of files and folders as is the case in the ioDrNmFls field when calling
  1475. PBGetCatInfo for a directory.
  1476.  
  1477. Or, after calling PBHGetVInfo do I then have to call PBGetCatInfo to get
  1478. the info I need?
  1479.  
  1480. Thanks!
  1481.  
  1482. -- John
  1483. ...........................................................................
  1484. John Purlia, Staff Engineer      :
  1485. Eudora New Product Research Guy  :    "I hate repagination"
  1486. QUALCOMM, Inc.                   :            -- me, after using Word 6
  1487. jpurlia@qualcomm.com             :               for any complex document
  1488.  
  1489. +++++++++++++++++++++++++++
  1490.  
  1491. >From David Gillies <daggilli@vader.brad.ac.uk>
  1492. Date: Thu, 28 Nov 1996 16:50:31 +0000
  1493. Organization: University of Bradford
  1494.  
  1495. John Purlia wrote:
  1496. > Can anyone tell me how to easily get the accurate number of items in a
  1497. > root directory?  Calling PBHGetVInfo on a volume seems to return only in
  1498. > ioVNmFls the number of _files_ in the directory, not the combined number
  1499. > of files and folders as is the case in the ioDrNmFls field when calling
  1500. > PBGetCatInfo for a directory.
  1501. > Or, after calling PBHGetVInfo do I then have to call PBGetCatInfo to get
  1502. > the info I need?
  1503. If you know the reference number of the disk you want then just use
  1504. PBGetCatInfo with 2 (fsRtDirID) in the ioDirID field. If you want to
  1505. return the number of objects of a given type i.e. files *or* folders
  1506. then you need to be a bit cleverer. The only way I could think of to
  1507. do this was to index through the directory checking ioFlAttrib&0x10
  1508. to see if the entry was a folder. But if you are looking at the root
  1509. directory (i.e. parID=2) then you need to be even more careful if you
  1510. only want *visible* items. You can't just check ioFlUsrWds.fdFlags&
  1511. fInvisible since Apple have thoughtfully ignored this for the Trash,
  1512. Temporary Items and Desktop folders. "Why?", I hear you cry. God only
  1513. knows, but it is a *right pain* and very, very annoying. Can you hear
  1514. me Mr. Anderson?
  1515.  
  1516. To avoid this silliness, you can use FindFolder to locate the three
  1517. offending folders and then reject them if you get these IDs back from
  1518. PBGetCatInfo, but it seems a bit lame to have to do this. 
  1519. -- 
  1520. ______________________________________________________________________
  1521. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  1522.       University of Bradford, Bradford, West Yorkshire, England
  1523. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  1524.  
  1525. +++++++++++++++++++++++++++
  1526.  
  1527. >From jumplong@aol.com
  1528. Date: 30 Nov 1996 15:36:07 GMT
  1529. Organization: AOL http://www.aol.com
  1530.  
  1531. John Purlia wrote:
  1532. >Can anyone tell me how to easily get the accurate number of
  1533. >items in a root directory?  Calling PBHGetVInfo on a volume
  1534. >seems to return only in ioVNmFls the number of _files_ in the
  1535. >directory, not the combined number of files and folders as is
  1536. >the case in the ioDrNmFls field when calling PBGetCatInfo for a
  1537. >directory.
  1538. >
  1539. >Or, after calling PBHGetVInfo do I then have to call
  1540. >PBGetCatInfo to get the info I need?
  1541.  
  1542. Yes, PBHGetVInfo returns just the number of files (not directories) in
  1543. ioVNmFls and then, only if you *don't* pass PBHGetVInfo a working
  1544. directory number. If you pass a working directory number as the ioVRefNum
  1545. parameter, PBHGetVInfo returns the number of files in the directory
  1546. refered to by working directory.
  1547.  
  1548. If you need the number of files and directories in a given directory,
  1549. you'll have to use PBGetCatInfo and index through the directory entries to
  1550. get an accurate count.
  1551.  
  1552. - Jim Luther
  1553.  
  1554. +++++++++++++++++++++++++++
  1555.  
  1556. >From a (a)
  1557. Date: 3 Dec 1996 23:31:16 GMT
  1558. Organization: a
  1559.  
  1560. In article <329DC2D7.4EA2@vader.brad.ac.uk>, David Gillies
  1561. <daggilli@vader.brad.ac.uk> wrote:
  1562.  
  1563. > John Purlia wrote:
  1564. > > 
  1565. > > Can anyone tell me how to easily get the accurate number of items in a
  1566. > > root directory?  Calling PBHGetVInfo on a volume seems to return only in
  1567. > > ioVNmFls the number of _files_ in the directory, not the combined number
  1568. > > of files and folders as is the case in the ioDrNmFls field when calling
  1569. > > PBGetCatInfo for a directory.
  1570. > > 
  1571. > > Or, after calling PBHGetVInfo do I then have to call PBGetCatInfo to get
  1572. > > the info I need?
  1573. > > 
  1574. > If you know the reference number of the disk you want then just use
  1575. > PBGetCatInfo with 2 (fsRtDirID) in the ioDirID field. If you want to
  1576.  
  1577. Use PBGetCatInfo to index the root directory directly.  Don't trust
  1578. PBGetCatInfo to return the correct number of items in the directory.  HFS
  1579. is cool, but some of the other file systems such as unix, OS/400, or DOS
  1580. don't keep track of the number of directory items correctly.
  1581.  
  1582. Sorry for the painful news,
  1583.  
  1584. Robert Thurman
  1585. Shokwave Software
  1586. www.shokwave.com
  1587.  
  1588. ---------------------------
  1589.  
  1590. >From mschwa4259@aol.com
  1591. Subject: Put file without Dialog Box
  1592. Date: 7 Dec 1996 22:40:39 GMT
  1593. Organization: AOL http://www.aol.com
  1594.  
  1595. Hi,
  1596.  
  1597. I'm curious how you could creat a file, without having to call
  1598. StandardPutFile() to get a reply.  My program has a scratch datafile and I
  1599. really don't want to have a diaog box pop up everytime I launch.  I'm sure
  1600. it's easy I just don;t know how to do it.
  1601.  
  1602. Thanks,
  1603.  
  1604. Matt
  1605.  
  1606. +++++++++++++++++++++++++++
  1607.  
  1608. >From jude@smellycat.com (Jude Giampaolo)
  1609. Date: Sat, 07 Dec 1996 18:01:21 -0500
  1610. Organization: CyberDrugs
  1611.  
  1612. In article <19961207224000.RAA25146@ladder01.news.aol.com>,
  1613. mschwa4259@aol.com wrote:
  1614.  
  1615. > I'm curious how you could creat a file, without having to call
  1616. > StandardPutFile() to get a reply.  My program has a scratch datafile and I
  1617. > really don't want to have a diaog box pop up everytime I launch.  I'm sure
  1618. > it's easy I just don;t know how to do it.
  1619.  
  1620. Just build an FSSpec using FSMakeFSSpec instead of using the file spec
  1621. returned in the standard file reply.....
  1622.  
  1623. -- 
  1624. Jude Charles Giampaolo        'I was lined up for glory, but the
  1625. jcg161@psu.edu                    tickets sold out in advance'
  1626. jude@smellycat.com      http://prozac.cwru.edu/jude/JudeHome.html
  1627.  
  1628. +++++++++++++++++++++++++++
  1629.  
  1630. >From squires@crl.com (Scott Squires)
  1631. Date: Sat, 07 Dec 1996 17:56:59 -0800
  1632. Organization: Puffin Designs
  1633.  
  1634. In article <19961207224000.RAA25146@ladder01.news.aol.com>,
  1635. mschwa4259@aol.com wrote:
  1636.  
  1637. >Hi,
  1638. >
  1639. >I'm curious how you could creat a file, without having to call
  1640. >StandardPutFile() to get a reply.  My program has a scratch datafile and I
  1641. >really don't want to have a diaog box pop up everytime I launch.  I'm sure
  1642. >it's easy I just don;t know how to do it.
  1643. >
  1644.  
  1645. Create a temp file in the Temporary Folder.  Inside Mac:Files should cover
  1646. this.
  1647. Create a FFSpec and just create it.
  1648.  
  1649. Inside Mac is also avialable at Apple's Web site.
  1650.  
  1651. -scott
  1652.  
  1653.  
  1654. Scott Squires               "Insert funny stuff here"
  1655. squires@crl.com
  1656. ScottSquir@aol.com
  1657.  
  1658.  
  1659. ---------------------------
  1660.  
  1661. >From "Zane H. Healy" <healyzh@ix.netcom.com>
  1662. Subject: Question about "The Debugger"
  1663. Date: Thu, 05 Dec 1996 19:26:07 -0800
  1664. Organization: Netcom
  1665.  
  1666. Hi,
  1667. I seem to have run into a problem with a program that I've been writing,
  1668. that the CW 9 Debugger can't handle.  So I'm wondering what peoples
  1669. opinions of "The Debugger" from "Jasik Designs" is.  Since in order to
  1670. get it I'd end up spending the money I'd intended on spending on
  1671. "Resourcerer" it would be nice to know which of the two people think is
  1672. the better investment.
  1673.  
  1674. Also how well does "The Debugger" handle running with "Ram Doubler" in
  1675. operation?  I know "Ram Doubler" causes some problems with CW.
  1676.  
  1677.                 Thanks for your time,
  1678.                                    Zane
  1679.  
  1680. -- 
  1681. | Zane H. Healy                    | UNIX Systems Adminstrator |
  1682. | healyzh@ix.netcom.com (primary)  | Linux Enthusiast          |
  1683. | healyzh@holonet.net (alternate)  | Mac Programmer            |
  1684. +----------------------------------+---------------------------+
  1685. | For Empire of the Petal Throne, and Traveller Role Playing   |
  1686. | see http://www.dragonfire.net/~healyzh/                      |
  1687.  
  1688. +++++++++++++++++++++++++++
  1689.  
  1690. >From awiner@oracle.com (Adam Winer)
  1691. Date: Thu, 05 Dec 1996 21:17:15 -0800
  1692. Organization: Oracle Corporation
  1693.  
  1694. In article <32A79210.5AAB@ix.netcom.com>, "Zane H. Healy"
  1695. <healyzh@ix.netcom.com> wrote:
  1696.  
  1697. > Hi,
  1698. > I seem to have run into a problem with a program that I've been writing,
  1699. > that the CW 9 Debugger can't handle.  So I'm wondering what peoples
  1700. > opinions of "The Debugger" from "Jasik Designs" is.  Since in order to
  1701. > get it I'd end up spending the money I'd intended on spending on
  1702. > "Resourcerer" it would be nice to know which of the two people think is
  1703. > the better investment.
  1704.  
  1705. Hard to say.  They're both nice to have.
  1706.  
  1707. Once you get past the (IMHO) sometimes obtuse and obscure interface,
  1708. Jasik's Debugger is an absolutely wonderful and incredibly powerful
  1709. tool.  If you're debugging drag-and-drop code, CDEF's, or anything
  1710. else that MW Debugger can't really handle, it's a lifesaver.  The
  1711. technical support is also superb.
  1712.  
  1713. Personally, I find the combination of the MW Debugger and MacsBug
  1714. handle 99% of my debugging needs.  But if that 1% is a critical
  1715. bug that prevents you from shipping your product...
  1716.  
  1717. > Also how well does "The Debugger" handle running with "Ram Doubler" in
  1718. > operation?  I know "Ram Doubler" causes some problems with CW.
  1719.  
  1720. To the best of my knowledge, it doesn't work with RamDoubler,
  1721. though it does work with SpeedDoubler.  (At least, that's how
  1722. it was about 6 months ago - it might have changed).  If you
  1723. have so little memory that you need RamDoubler, you're best off
  1724. not spending that money on either of these two products - get
  1725. yourself some memory.  Developing with less than 32MB is almost
  1726. hopeless.
  1727.  
  1728. -- Adam Winer
  1729. awiner@us.oracle.com
  1730.  
  1731. +++++++++++++++++++++++++++
  1732.  
  1733. >From al@crucible.powertools.com (Al Evans)
  1734. Date: 6 Dec 1996 08:08:08 -0600
  1735. Organization: Powertools, Austin, Texas
  1736.  
  1737. In article <32A79210.5AAB@ix.netcom.com>,
  1738. Zane H. Healy <healyzh@ix.netcom.com> wrote:
  1739.  
  1740. >So I'm wondering what peoples
  1741. >opinions of "The Debugger" from "Jasik Designs" is.  Since in order to
  1742. >get it I'd end up spending the money I'd intended on spending on
  1743. >"Resourcerer" it would be nice to know which of the two people think is
  1744. >the better investment.
  1745.  
  1746. Hmmm, "better investment" -- I find BOTH of them essential.
  1747.  
  1748. I switched to Jasik's as my general-purpose debugger several months ago,
  1749. largely because I got tired of seeing the words "register - not available".
  1750. It took a few days to get used to, and a couple of hours dorking with
  1751. MPW to get a script that would build the ".dsi" files required for
  1752. source-level debugging (I HATE writing MPW shell scripts, but that's
  1753. another story). "Keep the cheat sheet near you at all times," is
  1754. Steve's advice, and he's right.
  1755.  
  1756. The best things about it, in my opinion, are
  1757.  
  1758. 1) It has never taken more than 12 hours to get a problem solved, and
  1759. most questions are answered in one quick phone call or email. You'll
  1760. have a hard time finding anything it can't do, though occasionally, you
  1761. may have a hard time figuring out HOW to do something without asking
  1762. Steve.
  1763.  
  1764. 2) Command-shift-U shows a dump of all stack frames with all local
  1765. variables. In many cases, this makes it trivial to find out how you
  1766. got to your current untenable situation.
  1767.  
  1768. 3) Command-clicking on a source window switches it back and forth between
  1769. source and mixed source and assembly. Great for setting breakpoints in
  1770. the middle of compound statements.
  1771.  
  1772. My debugging needs tend to be moderate, and I've barely scratched the
  1773. surface of The Debugger's capabilities. Even so, I wouldn't be without
  1774. it. 
  1775.                     --Al Evans--
  1776. -- 
  1777. |||| Al Evans -- al@powertools.com -- proud of Graphic Elements Release 3 ||||
  1778. ====  A new standard for high-performance interactive Macintosh graphics  ====
  1779. ====         Available from mac.archive.umich.edu and mirrors in          ====
  1780. ||||        /mac/development/libraries/graphicelements3.0.sit.hqx         ||||
  1781.  
  1782. ---------------------------
  1783.  
  1784. >From James Munroe <eccles@astral.magic.ca>
  1785. Subject: QuickTime Musical Instruments?
  1786. Date: Sun, 01 Dec 1996 11:39:06 +0000
  1787. Organization: Total Net
  1788.  
  1789. I have looked through the Toolbox Assistant and my CodeWarrior 10 header 
  1790. files and can find no function prototypes or other info. showing the internal 
  1791. structure of QuickTime Musical Instruments or how to access them; 
  1792. neither in the QuickTime Components, nor in <MIDI.h>. Similarly, I have 
  1793. found nothing so far in this newgroup nor in 
  1794. comp.sys.mac.programmer.codewarrior, though I will be sending this 
  1795. question to them as well.
  1796. if anyone has these header files or can tell me where to get them, please 
  1797. email me at <eccles@astral.magic.ca> or <James_Munroe@goodmedia.com>. 
  1798. I'd really appreciate it.
  1799.  
  1800. Cheers,
  1801.  
  1802. James.
  1803.  
  1804. +++++++++++++++++++++++++++
  1805.  
  1806. >From bitzm@apple.com (Mike Bitz)
  1807. Date: Mon, 02 Dec 1996 14:50:42 -0700
  1808. Organization: Apple Computer, Inc.
  1809.  
  1810. In article <32A16E5A.7647@astral.magic.ca>, James Munroe
  1811. <eccles@astral.magic.ca> wrote:
  1812.  
  1813. > I have looked through the Toolbox Assistant and my CodeWarrior 10 header 
  1814. > files and can find no function prototypes or other info. showing the internal 
  1815. > structure of QuickTime Musical Instruments or how to access them; 
  1816.  
  1817. QTMA function prototypes are found in QuickTimeMusic.h.  Be sure to grab
  1818. the latest QuickTime 2.5 headers and libraries from:
  1819.  
  1820.      <http://quicktime.apple.com/dev/tool.html>
  1821.  
  1822. Also, David Van Brink has provided oodles of QTMA information:
  1823.  
  1824.      <http://www.srm.com/qtma/>
  1825.  
  1826. -Mike
  1827.  
  1828. +++++++++++++++++++++++++++
  1829.  
  1830. >From David Reiss <reiss@astro.washington.edu>
  1831. Date: Tue, 03 Dec 1996 13:51:56 -0800
  1832. Organization: http://www.astro.washington.edu/reiss
  1833.  
  1834. I'm also interested in trying to play with this stuff, but it
  1835. seems that the link to the QT 2.5 interfaces on the page you
  1836. mention below is invalid.  Where can I get at the darn things!?
  1837.  
  1838. <ftp://ftp.info.apple.com/dts/quicktime
  1839.  
  1840. is gone!
  1841.  
  1842. THanks.
  1843. -David
  1844.  
  1845. Mike Bitz wrote:
  1846. > In article <32A16E5A.7647@astral.magic.ca>, James Munroe
  1847. > <eccles@astral.magic.ca> wrote:
  1848. > > I have looked through the Toolbox Assistant and my CodeWarrior 10 header
  1849. > > files and can find no function prototypes or other info. showing the internal
  1850. > > structure of QuickTime Musical Instruments or how to access them;
  1851. > QTMA function prototypes are found in QuickTimeMusic.h.  Be sure to grab
  1852. > the latest QuickTime 2.5 headers and libraries from:
  1853. >      <http://quicktime.apple.com/dev/tool.html>
  1854. > Also, David Van Brink has provided oodles of QTMA information:
  1855. >      <http://www.srm.com/qtma/>
  1856. > -Mike
  1857.  
  1858. +++++++++++++++++++++++++++
  1859.  
  1860. >From sgraff@apple.com (Steve Graff)
  1861. Date: Fri, 06 Dec 1996 11:51:35 -0800
  1862. Organization: Apple Computer, Inc.
  1863.  
  1864. In article <32A4A0FC.4513@astro.washington.edu>, David Reiss
  1865. <reiss@astro.washington.edu> wrote:
  1866.  
  1867. > I'm also interested in trying to play with this stuff, but it
  1868. > seems that the link to the QT 2.5 interfaces on the page you
  1869. > mention below is invalid.  Where can I get at the darn things!?
  1870. > <ftp://ftp.info.apple.com/dts/quicktime
  1871. > is gone!
  1872.  
  1873. They can also be found on the QuickTime FAQ web page:
  1874.  
  1875.   <http://www.QuickTimeFAQ.org/developer/>
  1876.  
  1877. -- 
  1878. Steve Graff
  1879. Developer Support
  1880. Apple Computer, Inc.
  1881. sgraff@apple.com
  1882.  
  1883. ---------------------------
  1884.  
  1885. >From Shelley Walsh <Shelley@Shells.demon.co.uk>
  1886. Subject: Screen Redrawing Command Wanted
  1887. Date: Sun, 01 Dec 1996 20:48:18 GMT
  1888. Organization: (none)
  1889.  
  1890. Can anybody tell me what the Mac Toolbox command to redraw the screen 
  1891. after you have changed something. Thanks in advance for any help you can 
  1892. give me.
  1893.  
  1894.  
  1895.  
  1896. +++++++++++++++++++++++++++
  1897.  
  1898. >From Shelley Walsh <Shelley@Shells.demon.co.uk>
  1899. Date: Wed, 04 Dec 1996 11:03:12 GMT
  1900. Organization: (none)
  1901.  
  1902. Thanks to everyone who responded to this. I'm okay now. I used 
  1903. InvalRect() and it worked. It seems like I used something different the 
  1904. last time I did this, but I'm in the process of moving and my Inside Mac 
  1905. book is still at my old house. Anyway, thanks everybody.
  1906.  
  1907.  
  1908.  
  1909. +++++++++++++++++++++++++++
  1910.  
  1911. >From David Gillies <daggilli@vader.brad.ac.uk>
  1912. Date: Wed, 04 Dec 1996 16:38:11 +0000
  1913. Organization: University of Bradford
  1914.  
  1915. Shelley Walsh wrote:
  1916. > Can anybody tell me what the Mac Toolbox command to redraw the screen
  1917. > after you have changed something. Thanks in advance for any help you can
  1918. > give me.
  1919. Ain't no such thing in general - apps handle their own drawing. You
  1920. might be able to fake it by setting the port to the window you want
  1921. to update and calling PaintOne().
  1922. -- 
  1923. ______________________________________________________________________
  1924. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  1925.       University of Bradford, Bradford, West Yorkshire, England
  1926. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  1927.  
  1928. ---------------------------
  1929.  
  1930. >From jbk3@acpub.duke.edu (Jeff Kolesky)
  1931. Subject: Scrolling
  1932. Date: Wed, 04 Dec 1996 00:44:22 -0500
  1933. Organization: Duke University, Durham, NC, USA
  1934.  
  1935. I am working on a game with a constant scrolling background that can
  1936. change speeds when the player 
  1937. moves the mouse.  Currently I am using two offscreen Gworlds and simply
  1938. copybitting the current 
  1939. screen rect to the work port, adding sprites to that, and then blitting to
  1940. the screen.  Then the rect in the 
  1941. scrolling background moves up and the process starts again.  Any ideas on
  1942. a better way of doing this?
  1943.  
  1944. Thanks,
  1945. Jeff
  1946.  
  1947. +++++++++++++++++++++++++++
  1948.  
  1949. >From karlbunker@aol.com
  1950. Date: 4 Dec 1996 18:27:56 GMT
  1951. Organization: AOL http://www.aol.com
  1952.  
  1953. > I am working on a game with a constant scrolling background that can
  1954. > change speeds when the player moves the mouse. Currently I am using two
  1955. > offscreen Gworlds and simply copybitting the current screen rect to the
  1956. > work port, adding sprites to that, and then blitting to the screen.
  1957. > Then the rect in the scrolling background moves up and the process
  1958. > starts again. Any ideas on a better way of doing this?
  1959.  
  1960. Yeah; check out the SpriteWorld 2 animation library. It does what you want
  1961. and much more.
  1962.  
  1963. Karl Bunker
  1964. KarlBunker@aol.com
  1965. http://users.aol.com/karlbunker/
  1966. SpriteWorld 2 Web page:
  1967. http://users.aol.com/spritewld2/
  1968.  
  1969.  
  1970. +++++++++++++++++++++++++++
  1971.  
  1972. >From antispam@apple.com (Cary Farrier)
  1973. Date: Wed, 04 Dec 1996 12:37:03 -0800
  1974. Organization: Apple Computer, Inc.
  1975.  
  1976. In article <andrew-0412960739140001@pat2.metrowerks.com>,
  1977. andrew@metrowerks.com (Andrew R. Southwick) wrote:
  1978. > (5) DrawSprockets can give you a "back buffer" (which is the offscreen
  1979. > world that you build a frame into before copying it to the screen) and
  1980. > then get that back buffer to the screen very quickly (if the proper
  1981. > hardware is available).  Otherwise, it degenerates to quickdraw, which
  1982. > is what you are doing anyway.  Well worth looking into; it also does
  1983. > a lot of other cool things.  Check out Apple's Sprockets web page at:
  1984. > <http://www.devworld.apple.com>.  In the Hot Technologies list along
  1985. > the left side of the screen, choose the Games link.
  1986.  
  1987. Actually, DSp only uses CopyBits if the back buffer is not the same
  1988. depth as the display, a situation that a program would have to
  1989. setup explicitly -- it wouldn't happen unless the program requested it.
  1990. The hardware in use really isn't a factor in the decision.
  1991.  
  1992. -> Cary
  1993.  
  1994. -- 
  1995. - --------------------------------------------------------------------
  1996. Cary Farrier, aka Mr. Draw Sprocket
  1997. Software Engineer, Apple Game Technology Group
  1998. farrier@apple.com
  1999. Visit the Apple Games Website at <http://dev.info.apple.com/games>
  2000.  
  2001. ---------------------------
  2002.  
  2003. >From nfranke@pacbell.net (Norman Franke)
  2004. Subject: Sound Input Manager
  2005. Date: Fri, 29 Nov 1996 14:21:24 -0800
  2006. Organization: Infinity City
  2007.  
  2008.  
  2009. I'm recording sounds using the Sound Input Manager using double buffering.
  2010. I've noticed there are clicks between the buffers. Is there some multiple
  2011. to make the buffers so this won't happen? I seem to recall something to
  2012. this effect posted here...
  2013.  
  2014. Thanks!
  2015.  
  2016. -- 
  2017. Norman Franke
  2018. nfranke@pacbell.net
  2019.  
  2020. +++++++++++++++++++++++++++
  2021.  
  2022. >From jaeho@xs4all.nl (Jae Ho Chang)
  2023. Date: Sat, 30 Nov 1996 21:16:02 +0100
  2024. Organization: eMusicas
  2025.  
  2026. > I'm recording sounds using the Sound Input Manager using double buffering.
  2027. > I've noticed there are clicks between the buffers. Is there some multiple
  2028. > to make the buffers so this won't happen? I seem to recall something to
  2029. > this effect posted here...
  2030.  
  2031. Hi Norman, did you turn on the continuous recording feature (using
  2032. siContinuos selector with SPBSetDeviceInfo()) ?
  2033.  
  2034. PS. I cannot remeber the function name exactly.
  2035.  
  2036. Jae Ho Chang :-)
  2037. --
  2038. Sound from Chaos?
  2039.   Visit Chaotic Synthesis Home Page
  2040.   <http://www.xs4all.nl/~jaeho/ChaoticSynth/>
  2041.  
  2042. Looking for cool Macintosh note utility?
  2043.   Check out FinderNote the amazing note utility
  2044.   <http://www.xs4all.nl/~jaeho/FinderNote/>
  2045.  
  2046. +++++++++++++++++++++++++++
  2047.  
  2048. >From Jackson Software Development <development@jacksoncorp.com>
  2049. Date: 2 Dec 1996 15:29:32 GMT
  2050. Organization: Jackson Software
  2051.  
  2052. In article <nfranke-ya023480002911961421240001@pbinews.pacbell.net>
  2053. Norman Franke, nfranke@pacbell.net writes:
  2054. >I'm recording sounds using the Sound Input Manager using double buffering.
  2055. >I've noticed there are clicks between the buffers. Is there some multiple
  2056. >to make the buffers so this won't happen? I seem to recall something to
  2057. >this effect posted here...
  2058.  
  2059. There's a selector that you can send to SPBGetDeviceInfo (). I believe
  2060. it's
  2061. siBufferSize, or something like that. Your buffers should be an integer
  2062. multiple of that.
  2063.  
  2064. Darrin
  2065.  
  2066. +++++++++++++++++++++++++++
  2067.  
  2068. >From franke1@llnl.gov (Norman Franke)
  2069. Date: Mon, 02 Dec 1996 08:59:46 -0800
  2070. Organization: Lawrence Livermore National Laboratory
  2071.  
  2072. In article <jaeho-3011962116030001@ztm07-04.dial.xs4all.nl>,
  2073. jaeho@xs4all.nl (Jae Ho Chang) wrote:
  2074.  
  2075. > Hi Norman, did you turn on the continuous recording feature (using
  2076. > siContinuos selector with SPBSetDeviceInfo()) ?
  2077.  
  2078. Actually, no I didn't. It wasn't clear what that did from reading MPTA and
  2079. it did take a while to find it in IM: Sound. However, that does seem to
  2080. work better. Thanks.
  2081.  
  2082. -- 
  2083. Norman Franke
  2084. franke1@llnl.gov
  2085.  
  2086. +++++++++++++++++++++++++++
  2087.  
  2088. >From franke1@llnl.gov (Norman Franke)
  2089. Date: Mon, 02 Dec 1996 09:02:27 -0800
  2090. Organization: Lawrence Livermore National Laboratory
  2091.  
  2092. In article <57usks$i1k@kirin.wwa.com>, Jackson Software Development
  2093. <development@jacksoncorp.com> wrote:
  2094.  
  2095. > There's a selector that you can send to SPBGetDeviceInfo (). I believe
  2096. > it's
  2097. > siBufferSize, or something like that. Your buffers should be an integer
  2098. > multiple of that.
  2099.  
  2100. Ah, thanks. It's called siDeviceBufferInfo.
  2101.  
  2102. -- 
  2103. Norman Franke
  2104. franke1@llnl.gov
  2105.  
  2106. ---------------------------
  2107.  
  2108. >From eloni19@mail.idt.net (ZiM)
  2109. Subject: SpriteWorld 2
  2110. Date: Thu, 05 Dec 1996 18:07:22 -0500
  2111. Organization: n/a
  2112.  
  2113. Greets,
  2114.    I have just gotten a copy of SpriteWorld 2, and I have run into a major
  2115. pitfall. In a small app that I was testing with, I ran some code, and when
  2116. i was stepping through it with the debugger, the whole machine froze - no
  2117. mouse movement, no MacsBug, nothing.
  2118.  
  2119. here's the troublesome code:
  2120.  
  2121.       SimpleSpriteP = gSimpleSpriteArray[spriteNum];
  2122.       SWAddSprite(SpriteLayerP, SimpleSpriteP);
  2123.       SWSetSpriteLocation(SimpleSpriteP, horizLoc, vertLoc); /* This is
  2124. the line that froze everything up */
  2125.       SWSetSpriteDrawProc(SimpleSpriteP, gSpriteDrawProc);
  2126.  
  2127.  
  2128. BTW - i'm using symantic 7.0.5
  2129.  
  2130. any input would be greatly appreciated
  2131.  
  2132. thank you, in advance
  2133.    Pete Lukow
  2134.    eloni19@mail.idt.net
  2135. -0-ZiM-0-
  2136.  
  2137. +++++++++++++++++++++++++++
  2138.  
  2139. >From eloni19@mail.idt.net (ZiM)
  2140. Date: Thu, 05 Dec 1996 19:47:39 -0500
  2141. Organization: n/a
  2142.  
  2143. In article <eloni19-0512961807220001@hingham109.pcix.com>,
  2144. eloni19@mail.idt.net (ZiM) wrote:
  2145.  
  2146. > Greets,
  2147. >    I have just gotten a copy of SpriteWorld 2, and I have run into a major
  2148. > pitfall. In a small app that I was testing with, I ran some code, and when
  2149. > i was stepping through it with the debugger, the whole machine froze - no
  2150. > mouse movement, no MacsBug, nothing.
  2151. > here's the troublesome code:
  2152. >       SimpleSpriteP = gSimpleSpriteArray[spriteNum];
  2153. >       SWAddSprite(SpriteLayerP, SimpleSpriteP);
  2154. >       SWSetSpriteLocation(SimpleSpriteP, horizLoc, vertLoc); /* This is
  2155. > the line that froze everything up */
  2156. >       SWSetSpriteDrawProc(SimpleSpriteP, gSpriteDrawProc);
  2157. > BTW - i'm using symantic 7.0.5
  2158. > any input would be greatly appreciated
  2159. > thank you, in advance
  2160. >    Pete Lukow
  2161. >    eloni19@mail.idt.net
  2162. > -0-ZiM-0-
  2163.  
  2164. OK, I fiddled around with the code s'more and i finally got it so that it
  2165. no loger crashed, apparently I was handing it a frame that didn't exist.
  2166.  
  2167. Anyway - another question, now when it attempts to use the
  2168. SWStdSpriteDrawProc, i get a bus error for no apparent reason. thoughts?
  2169.  
  2170. thanks =)
  2171. -0-ZiM-0-
  2172.  
  2173. +++++++++++++++++++++++++++
  2174.  
  2175. >From karlbunker@aol.com
  2176. Date: 8 Dec 1996 15:39:34 GMT
  2177. Organization: AOL http://www.aol.com
  2178.  
  2179. eloni19@mail.idt.net (ZiM) sez:
  2180.  
  2181. > Anyway - another question, now when it attempts to use the
  2182. > SWStdSpriteDrawProc, i get a bus error for no apparent reason.
  2183. > thoughts?
  2184.  
  2185. Unfortunately, that could be any one of a number of possible errors in
  2186. your code. A few that spring to mind first are: perhaps you didn't lock
  2187. the Sprite, or the Sprite was never added to a Layer, or the Layer never
  2188. added to the SpriteWorld.
  2189.  
  2190. Karl Bunker
  2191. KarlBunker@aol.com
  2192. http://users.aol.com/karlbunker/
  2193. SpriteWorld 2 Web page:
  2194. http://users.aol.com/spritewld2/
  2195.  
  2196. ---------------------------
  2197.  
  2198. >From ram@terminus.cs.umb.edu (Robert A. (Bob) Morris)
  2199. Subject: Symantec C++ fstreams write unreadable files
  2200. Date: 22 Nov 1996 16:49:10 -0500
  2201. Organization: University of Massachusetts at Boston
  2202.  
  2203. I'm programming in Symantec C++ 7.0 on a 68k system, 8.0 on a power
  2204. mac. OS is System 7.5. In either case, I open an fstream fro writing
  2205. with calls like
  2206.  
  2207.     fstream logStream;
  2208.     logStream.open("log.txt");
  2209.  
  2210. and write with        logStream << 
  2211.  
  2212. There are no I/O errors and the expected characters are in fact
  2213. written in the file. However, neither TeachText nor SimpleText are
  2214. able to open the file. Word 5.1, however, does so if I ask it to open
  2215. "All Files" instead of just "Readable" files.
  2216.  
  2217.  
  2218. So what's keeping me from reading these plain text files with light
  2219. weight readers?
  2220.  
  2221. Thanks for replies by mail
  2222.  
  2223. Bob Morris
  2224. ram@cs.umb.edu
  2225.  
  2226. +++++++++++++++++++++++++++
  2227.  
  2228. >From "Thomas L. Ferrell" <ferrelltl@ornl.gov>
  2229. Date: 24 Nov 1996 22:49:36 GMT
  2230. Organization: Oak Ridge National Lab
  2231.  
  2232. Uh oh! I was off-base on this one. Bob's code he sent is below. Can 
  2233. anyone help? I couldn't get SimpleText to open the file either! thx, tom
  2234. This code exhibits the problem:
  2235.  
  2236. #include <iostream.h>
  2237. #include <fstream.h>
  2238. void main()
  2239. {
  2240.     ofstream foo;
  2241.     foo.open("foo.txt");
  2242.     foo << "Hello" << endl;
  2243.     foo.close();
  2244. }
  2245.  
  2246. The same thing happens if foo is an fstream instead of an ofstream.
  2247.  
  2248. Maybe there is some compiler option I've got set wrong, but I can't
  2249. see what it is, nor can I find anything in Symantec's docs.
  2250.  
  2251.  
  2252.  
  2253. +++++++++++++++++++++++++++
  2254.  
  2255. >From johnm@buttenet.com (Johnathon McAlister)
  2256. Date: Fri, 29 Nov 1996 15:59:56 -0700
  2257. Organization: Home
  2258.  
  2259. Are the file type and creator correct?
  2260.  
  2261. -- 
  2262. Johnathon McAlister
  2263. Senior Programmer, MT Lottery (days)
  2264. Mac and Internet Consultant (evenings)
  2265. johnm@buttenet.com
  2266.  
  2267. +++++++++++++++++++++++++++
  2268.  
  2269. >From "Thomas L. Ferrell" <ferrelltl@ornl.gov>
  2270. Date: 6 Dec 1996 00:20:58 GMT
  2271. Organization: Oak Ridge National Lab
  2272.  
  2273. It turns out that the answer to Bob Morris' question on the lack of 
  2274. creator/file type in iostreams text files created in Symt C++ is posted 
  2275. in one of the newsgroups at Symantec's sites. I'll post it if anyone 
  2276. would like to see it.
  2277. tom
  2278.  
  2279.  
  2280.  
  2281. ---------------------------
  2282.  
  2283. >From Liam Fitzgerald <liam@cyberplus.ca>
  2284. Subject: Unlocking a Volume
  2285. Date: 2 Dec 1996 17:03:06 GMT
  2286. Organization: Internet News Service
  2287.  
  2288. I am trying to write a program that will lock or unlock a mounted 
  2289. volume using PSSetVInfo. I can get the volume and it's attributes and 
  2290. then apply the mask to flip the bit using 0x8000 but when I try to 
  2291. flip it back using the same routine etc and 0x7FFFF mask guess what! I 
  2292. get a write error on my freshly locked volume. This routine writes to 
  2293. the ioVAtrb and produces a software locked disk but I need a way to 
  2294. get around the lock when I rewrite my unlock prg.
  2295. Any Ideas? I'm using CW8 on a 6100 and 7.5.3. I am writing this as a 
  2296. 68k prg.
  2297.  
  2298. HParamBlockRec    pb1
  2299.  
  2300. pb1.volumeParam.ioVolIndex = 0;        
  2301. AnErr = PBHGetVInfo( &pb1, FALSE );
  2302. if (AnErr) { printf("\n No such volume!"); }
  2303.  
  2304. pb1.volumeParam.ioVAtrb  |= 0x8000;    
  2305.                                          
  2306. AnErr = PBSetVInfo(&pb1, 1);
  2307. if (AnErr)            
  2308.      { 
  2309.          printf("\n error with set vol");    
  2310.          
  2311.           return (AnErr);}
  2312.  
  2313. +++++++++++++++++++++++++++
  2314.  
  2315. >From test@admin
  2316. Date: Mon,  2 Dec 96 12:13:39 +0000
  2317. Organization: (none)
  2318.  
  2319. Aha ! you fell for the same trap :-)
  2320.  
  2321. The reason is  that PBSet/GetVInfo calls work with a <<COPY>> of the VCB. 
  2322. Yes you can lock the volume by modifying the flags and calling PBSetVInfo 
  2323. but you cant change the flags again because the  volume is  locked !
  2324.  You need to access the  original Volume Control Block directly to undo the 
  2325. locking.
  2326. Apple just forgot to mention it:-)
  2327. Below are the routines that accomplish this:
  2328. HTH, Andy
  2329.  
  2330. void DoLock(short volRefNum)
  2331.  {
  2332.     
  2333.         OSErr err;
  2334.         QHdrPtr    qhp;
  2335.      VCB    *vcbp;
  2336.     
  2337.     qhp= GetVCBQHdr();    
  2338.     vcbp = (VCB *)qhp->qHead;
  2339.  
  2340.    
  2341. // loop thru the VCB queue to find the right volume
  2342.    while(    vcbp)
  2343.     {
  2344.       if(vcbp->vcbVRefNum ==volRefNum)
  2345.          break;
  2346.       vcbp=(VCB *)vcbp->qLink;
  2347.     }
  2348.  
  2349.    //lock it!
  2350.    vcbp->vcbAtrb|= 0x8000;
  2351.    //save changes
  2352.     err = FlushVol(nil,vcbp->vcbVRefNum);
  2353.  
  2354.     }
  2355.     
  2356.     
  2357.     /*****/
  2358.     
  2359.     
  2360.     void DoUnlock(short volRefNum)
  2361.     
  2362.     {
  2363.  
  2364.     
  2365.      OSErr err;
  2366.      QHdrPtr    qhp;
  2367.   VCB    *vcbp;
  2368.  
  2369.    qhp= GetVCBQHdr();    
  2370.    vcbp = (VCB *)qhp->qHead;
  2371.  
  2372. // loop thru the VCB queue to find the right volume
  2373.     while(    vcbp)
  2374.     {
  2375.     if(vcbp->vcbVRefNum ==volRefNum)
  2376.       break;
  2377.       vcbp=(VCB *)vcbp->qLink;
  2378.      }
  2379.  
  2380.    // unlock it!!
  2381.     vcbp->vcbAtrb &= 0x7FFF;
  2382.   // save changes
  2383.     err = FlushVol(nil,vcbp->vcbVRefNum);
  2384.     
  2385.     
  2386.     }
  2387.     
  2388.     
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394. On Mon, Dec 2, 1996,5:03 PM Liam Fitzgerald wrote:
  2395. >I am trying to write a program that will lock or unlock a mounted 
  2396. >volume using PSSetVInfo. I can get the volume and it's attributes and 
  2397. >then apply the mask to flip the bit using 0x8000 but when I try to 
  2398. >flip it back using the same routine etc and 0x7FFFF mask guess what! I 
  2399. >get a write error on my freshly locked volume. This routine writes to 
  2400. >the ioVAtrb and produces a software locked disk but I need a way to 
  2401. >get around the lock when I rewrite my unlock prg.
  2402. >Any Ideas? I'm using CW8 on a 6100 and 7.5.3. I am writing this as a 
  2403. >68k prg.
  2404. >
  2405. >HParamBlockRec    pb1
  2406. >
  2407. >pb1.volumeParam.ioVolIndex = 0;        
  2408. >AnErr = PBHGetVInfo( &pb1, FALSE );
  2409. >if (AnErr) { printf("\n No such volume!"); }
  2410. >
  2411. >pb1.volumeParam.ioVAtrb  |= 0x8000;    
  2412. >                                         
  2413. >AnErr = PBSetVInfo(&pb1, 1);
  2414. >if (AnErr)            
  2415. >     { 
  2416. >         printf("\n error with set vol");    
  2417. >         
  2418. >          return (AnErr);}
  2419. >
  2420. End of excerpt from Liam Fitzgerald.
  2421.  
  2422.  
  2423.  
  2424.  
  2425. +++++++++++++++++++++++++++
  2426.  
  2427. >From devon@onyx-tech.com (Devon Hubbard)
  2428. Date: Mon, 02 Dec 1996 14:41:46 -0700
  2429. Organization: Onyx Technology, Inc.
  2430.  
  2431. On Mon, Dec 2, 1996,5:03 PM Liam Fitzgerald wrote:
  2432. >I am trying to write a program that will lock or unlock a mounted 
  2433. >volume using PSSetVInfo. I can get the volume and it's attributes and 
  2434. >then apply the mask to flip the bit using 0x8000 but when I try to 
  2435. >flip it back using the same routine etc and 0x7FFFF mask guess what! I 
  2436. >get a write error on my freshly locked volume. This routine writes to 
  2437. >the ioVAtrb and produces a software locked disk but I need a way to 
  2438. >get around the lock when I rewrite my unlock prg.
  2439. >Any Ideas? I'm using CW8 on a 6100 and 7.5.3. I am writing this as a 
  2440. >68k prg.
  2441. >
  2442. >HParamBlockRec pb1
  2443. >
  2444. >pb1.volumeParam.ioVolIndex = 0;                
  2445. >AnErr = PBHGetVInfo( &pb1, FALSE );
  2446. >if (AnErr) { printf("\n No such volume!"); }
  2447. >
  2448. >pb1.volumeParam.ioVAtrb  |= 0x8000;    
  2449. >                                                                               
  2450.  
  2451. >AnErr = PBSetVInfo(&pb1, 1);
  2452. >if (AnErr)                     
  2453. >       { 
  2454. >               printf("\n error with set vol");        
  2455. >               
  2456. >               return (AnErr);}
  2457. >
  2458.  
  2459. Aside from trying to do this with code from your own application, you can
  2460. use a control panel called 'LockVol' to do this.  It's available on
  2461. info-mac and various other net sites as well as the Apple developer CDs.
  2462.  
  2463. dEVoN
  2464.  
  2465. ---------------------------
  2466.  
  2467. >From stian@mail.utexas.edu (Stian Oksavik)
  2468. Subject: Utility pattern?
  2469. Date: 5 Dec 1996 16:03:48 GMT
  2470. Organization: University of Texas at Austin
  2471.  
  2472. In System 7, the Desktop Patterns control panel lets you set a "utility"
  2473. pattern (try holding down option and see what the set desktop pattern
  2474. turns into.)
  2475. This pattern is used by desk accessories...or, rather, by items in the
  2476. Apple Menu. Examples include Find File, Calculator and the Scrapbook.
  2477.  
  2478. I'd like to use this same pattern in my own programs. Does anyone know how
  2479. I can access it? (I haven't started digging in the system file yet, so
  2480. pardon this post if it's a simple matter of reading a PPAT resource from
  2481. there.)
  2482.  
  2483. Thanks,
  2484. -Stian
  2485.  
  2486. +++++++++++++++++++++++++++
  2487.  
  2488. >From squires@crl.com (Scott Squires)
  2489. Date: Fri, 06 Dec 1996 20:47:34 -0800
  2490. Organization: Puffin Designs
  2491.  
  2492. In article <stian-0512961004090001@slip-c-8.ots.utexas.edu>,
  2493. stian@mail.utexas.edu (Stian Oksavik) wrote:
  2494.  
  2495. >In System 7, the Desktop Patterns control panel lets you set a "utility"
  2496. >pattern (try holding down option and see what the set desktop pattern
  2497. >turns into.)
  2498. >This pattern is used by desk accessories...or, rather, by items in the
  2499. >Apple Menu. Examples include Find File, Calculator and the Scrapbook.
  2500. >
  2501. >I'd like to use this same pattern in my own programs. Does anyone know how
  2502. >I can access it? (I haven't started digging in the system file yet, so
  2503. >pardon this post if it's a simple matter of reading a PPAT resource from
  2504. >there.)
  2505. >
  2506.  Get a copy of Apple's latest developer CD-ROM.  (Scan their web site,
  2507. it might be there)
  2508.  
  2509. -scott
  2510.  
  2511.  
  2512. Scott Squires               "Insert funny stuff here"
  2513. squires@crl.com
  2514. ScottSquir@aol.com
  2515.  
  2516.  
  2517. +++++++++++++++++++++++++++
  2518.  
  2519. >From fprefect@ambrosiasw.com (Matt Slot)
  2520. Date: Fri, 06 Dec 1996 10:41:48 -0500
  2521. Organization: Ambrosia Software
  2522.  
  2523. stian@mail.utexas.edu (Stian Oksavik) wrote:
  2524.  > In System 7, the Desktop Patterns control panel lets you set a "utility"
  2525.  > pattern (try holding down option and see what the set desktop pattern
  2526.  > turns into.)
  2527.  > This pattern is used by desk accessories...or, rather, by items in the
  2528.  > Apple Menu. Examples include Find File, Calculator and the Scrapbook.
  2529.  > 
  2530.  > I'd like to use this same pattern in my own programs. Does anyone know how
  2531.  > I can access it? (I haven't started digging in the system file yet, so
  2532.  > pardon this post if it's a simple matter of reading a PPAT resource from
  2533.  > there.)
  2534.  
  2535. Yep, that's all there is to it... it's 'ppat' ID=42.
  2536.  
  2537. Matt
  2538.  
  2539.  
  2540. * * * * * * * * * * * * * * * * * * * * * * * * * * ======================
  2541. *  Reality: Matt Slot, Bitwise Operator           *  Time is an illusion.
  2542. *  E-Mail:  mailto:fprefect@umich.edu             *  Lunchtime doubly so.
  2543. *  Web:     http://www.sils.umich.edu/~fprefect/  *     -- Douglas Adams
  2544. * * * * * * * * * * * * * * * * * * * * * * * * * * ======================
  2545.  
  2546. ---------------------------
  2547.  
  2548. >From dmiller@eentertainment.com (David Miller)
  2549. Subject: [Q] C++ and handles
  2550. Date: Tue, 03 Dec 1996 20:49:31 -0500
  2551. Organization: E! Entertainment Television
  2552.  
  2553. I'm a C Programmer, and I am starting to include some C++ objects in my
  2554. application. I have one application that creates and deletes many objects,
  2555. fragmenting memory after it has been running for a while.
  2556.  
  2557. My question is:
  2558.  
  2559. Is there a way to use new and delete with double indirection so the Memory
  2560. Manager will compact the heap for me?
  2561.  
  2562.  
  2563. David Miller
  2564.  
  2565. please respond to dmiller@eentertainment.com
  2566.  
  2567. +++++++++++++++++++++++++++
  2568.  
  2569. >From Wulf Hofbauer <wh@echo.chem.tu-berlin.de>
  2570. Date: Wed, 04 Dec 1996 14:21:51 +0100
  2571. Organization: Max-Volmer-Institut, TU Berlin
  2572.  
  2573. David Miller wrote:
  2574. > Is there a way to use new and delete with double indirection so the Memory
  2575. > Manager will compact the heap for me?
  2576.  
  2577. A partial solution would be to override the standard new and delete
  2578. operators. I guess however that this would conflict with several C++
  2579. constructs which assume pointers, not handles. I don't think it is worth
  2580. the hassle.
  2581.  
  2582. Personally, I think handles are a thing of the past. According to Knuth,
  2583. on average only a third of a pointer-based heap is unused due to
  2584. fragmentation. Relocating memory without special hardware to support
  2585. this is very inefficient and slows everything down, plus it may lead to
  2586. massive trashing in combination with virtual memory. There must be a
  2587. reason why so few systems use this approach, considering these topics
  2588. have been studied extensively a long time ago.
  2589.  
  2590. - Wulf
  2591.  
  2592. -- 
  2593.  ________________________________________________________
  2594. ! Dipl. Phys. Wulf Hofbauer  (wh@echo.chem.tu-berlin.de) !
  2595. ! Max-Volmer-Institut     Technische Universitaet Berlin !
  2596. ! Strasse des 17. Juni 135     10623 Berlin      Germany !
  2597. !________________________________________________________!
  2598.  
  2599. +++++++++++++++++++++++++++
  2600.  
  2601. >From "Pete Gontier -- DTS" <gurgle@apple.com>
  2602. Date: 6 Dec 96 11:42:00 -0800
  2603. Organization: Apple Computer, Inc.
  2604.  
  2605.  > Is there a way to use new and delete with double indirection
  2606.  > so the Memory Manager will compact the heap for me?
  2607.  
  2608.     <http://devworld.apple.com/dev/technotes/tn/tn1009.html>
  2609.  
  2610.  
  2611.  
  2612. +++++++++++++++++++++++++++
  2613.  
  2614. >From uzs90z@uni-bonn.de (Michael Schuerig)
  2615. Date: Thu, 5 Dec 1996 03:37:45 +0100
  2616. Organization: RHRZ - University of Bonn (Germany)
  2617.  
  2618. David Miller <dmiller@eentertainment.com> wrote:
  2619.  
  2620. > I'm a C Programmer, and I am starting to include some C++ objects in my
  2621. > application. I have one application that creates and deletes many objects,
  2622. > fragmenting memory after it has been running for a while.
  2623. > My question is:
  2624. > Is there a way to use new and delete with double indirection so the Memory
  2625. > Manager will compact the heap for me?
  2626.  
  2627. Don't use handles unless you're forced to by the system. I even think
  2628. I've read something to the effect that Apple is going to abandon handles
  2629. some day. A better solution in your case may be to write class specific
  2630. new/delete operators for your classes or you could look at one of the
  2631. commercially available heap managment packages.
  2632.  
  2633. Michael
  2634.  
  2635. - -
  2636. Michael Schuerig
  2637. mailto:uzs90z@uni-bonn.de
  2638. http://www.rhrz.uni-bonn.de/~uzs90z/
  2639.  
  2640. ---------------------------
  2641.  
  2642. >From Marc Hofmann <mhofmann@planete.net>
  2643. Subject: [Q] Convert double to string in C. How?
  2644. Date: Fri, 29 Nov 1996 10:40:07 +0100
  2645. Organization: Pressicom/Planete.net, France
  2646.  
  2647. language: C
  2648.  
  2649. Hello,
  2650.  
  2651. How can I set the default text for a edit text item in a dialog window
  2652. to a numeric value ( double )?
  2653.  
  2654. SetIText requires a Str255 text parameter. Is there a way to convert
  2655. double type variables to strings?
  2656. If not, how can I display ( numerically ) any given number in a dialog
  2657. edit text?
  2658.  
  2659.     Thanks
  2660.  
  2661. Marc
  2662.  
  2663. +++++++++++++++++++++++++++
  2664.  
  2665. >From krycyb@bergen.org (Krys Cybulski)
  2666. Date: Fri, 29 Nov 1996 15:41:02 GMT
  2667. Organization: (none)
  2668.  
  2669. In article <329EAF74.5536@planete.net>, Marc Hofmann
  2670. <mhofmann@planete.net> wrote:
  2671.  
  2672. > language: C
  2673. > Hello,
  2674. > How can I set the default text for a edit text item in a dialog window
  2675. > to a numeric value ( double )?
  2676. > SetIText requires a Str255 text parameter. Is there a way to convert
  2677. > double type variables to strings?
  2678. > If not, how can I display ( numerically ) any given number in a dialog
  2679. > edit text?
  2680. >         Thanks
  2681. > Marc
  2682.  
  2683. /* Float2Str255.c by Stefan Sinclair   Oct. 1995
  2684.    Apple provided a routine for converting integers (type 'long') to
  2685.    into Str255 format (NumToString), but they forgot floating point conversion!
  2686.    This simple routine converts from floating point (type 'double')
  2687.    into Str255 format.
  2688. */
  2689.  
  2690. #include <stdio.h> /* You need this one */
  2691. /* #include <Macheaders>   <- You will need to un-comment this line.
  2692.  Also, p2cstr and c2pstr are now defined in Apple's Macintosh headers.
  2693.  */
  2694.  
  2695. void Float2Str255(double fPt, Str255 pStr)
  2696. {
  2697.    int   myErr;
  2698.    
  2699.    p2cstr(pStr); /*†Convert to (char *) */
  2700.    myErr = sprintf((char *)pStr, "%G", fPt); /*†print floating point number */
  2701.    /* You can easily change the output format by replacing '%G' with
  2702. whatever makes you happy. */
  2703.    if(myErr >= 0) /*†Did everything go as planned? */
  2704.       c2pstr((char *)pStr); /*†Back to Str255 */
  2705.    /* else, here you will want to handle any error that might occur for
  2706. some freak reason. */
  2707. }
  2708.  
  2709. Have fun, I did not write this, but it should work...
  2710.  
  2711. -- Krys
  2712.  
  2713. +++++++++++++++++++++++++++
  2714.  
  2715. >From "Brian Mowatt" <Brian.Mowatt@dial.pipex.com>
  2716. Date: 29 Nov 1996 13:36:44 GMT
  2717. Organization: Crocodile Clips Ltd.
  2718.  
  2719. look at sprintf.
  2720.  
  2721. Marc Hofmann <mhofmann@planete.net> wrote in article <329EAF74.5536@planete.net>...
  2722. > language: C
  2723. > Hello,
  2724. > How can I set the default text for a edit text item in a dialog window
  2725. > to a numeric value ( double )?
  2726. > SetIText requires a Str255 text parameter. Is there a way to convert
  2727. > double type variables to strings?
  2728. > If not, how can I display ( numerically ) any given number in a dialog
  2729. > edit text?
  2730. >     Thanks
  2731. > Marc
  2732.  
  2733. +++++++++++++++++++++++++++
  2734.  
  2735. >From cbarron3@ix.netcom.com
  2736. Date: Fri, 29 Nov 1996 21:40:11 -0500
  2737. Organization: Netcom
  2738.  
  2739. Krys Cybulski <krycyb@bergen.org> wrote:
  2740.  
  2741. > In article <329EAF74.5536@planete.net>, Marc Hofmann
  2742. > <mhofmann@planete.net> wrote:
  2743. > > language: C
  2744. > > 
  2745. > > Hello,
  2746. > > 
  2747. > > How can I set the default text for a edit text item in a dialog window
  2748. > > to a numeric value ( double )?
  2749. > > 
  2750. > > SetIText requires a Str255 text parameter. Is there a way to convert
  2751. > > double type variables to strings?
  2752. > > If not, how can I display ( numerically ) any given number in a dialog
  2753. > > edit text?
  2754. #include <stdio.h>
  2755. #include <string.h>
  2756. /* convert double to a pascal string - 100% ansi C - adjust format
  2757. string below [in sprintf() to taste */
  2758. char *fl2pas(double x,char *buffer)
  2759. {
  2760.         sprintf(buffer+1,"%f10.6",x);
  2761.         *x = strlen(x+1);
  2762.         return x;
  2763. }
  2764.  
  2765. +++++++++++++++++++++++++++
  2766.  
  2767. >From presnick@qualcomm.com (Pete Resnick)
  2768. Date: Fri, 29 Nov 1996 22:58:32 -0600
  2769. Organization: QUALCOMM Incorporated
  2770.  
  2771. In article <329EAF74.5536@planete.net>, Marc Hofmann
  2772. <mhofmann@planete.net> wrote:
  2773.  
  2774. >Is there a way to convert
  2775. >double type variables to strings?
  2776.  
  2777. The proper Macintosh international-friendly way is to use ExtendedToString.
  2778.  
  2779. pr
  2780. -- 
  2781. Pete Resnick - presnick@qualcomm.com
  2782. QUALCOMM Incorporated
  2783.  
  2784. +++++++++++++++++++++++++++
  2785.  
  2786. >From cwatson@cam.org (Sean McBride)
  2787. Date: Sun, 01 Dec 1996 12:32:35 -0500
  2788. Organization: Communications Accessibles Montreal, Quebec Canada
  2789.  
  2790. In article <19961129214011881488@buf-ny3-51.ix.netcom.com>,
  2791. cbarron3@ix.netcom.com wrote:
  2792.  
  2793. >#include <stdio.h>
  2794. >#include <string.h>
  2795. >/* convert double to a pascal string - 100% ansi C - adjust format
  2796. >string below [in sprintf() to taste */
  2797. >char *fl2pas(double x,char *buffer)
  2798. >{
  2799. >        sprintf(buffer+1,"%f10.6",x);
  2800. >        *x = strlen(x+1);
  2801. >        return x;
  2802. >}
  2803.  
  2804. One thing I've always wondered, that no one seems to know (I guess I'll
  2805. have to try)...
  2806.  
  2807. Will this method be friendly with the settings in the Numbers control
  2808. panel?  What if a comma or other character is used instead of a period?
  2809.  
  2810. Bye!
  2811.  
  2812.  
  2813. _________________________________________________________________________
  2814.    H H      |                    |                                      |
  2815.    | |      |  Sean McBride      |      Life is like a pubic hair       |
  2816.  H-C-C-O-H  |  cwatson@cam.org   |          on a toilet seat:           |
  2817.    | |      |  Montreal, Canada  |    eventually, you get pissed off    |
  2818.    H H      |                    |                                      |
  2819. - -----------------------------------------------------------------------
  2820.  
  2821. +++++++++++++++++++++++++++
  2822.  
  2823. >From cbarron3@ix.netcom.com
  2824. Date: Sun, 1 Dec 1996 23:25:28 -0500
  2825. Organization: Netcom
  2826.  
  2827. Sean McBride <cwatson@cam.org> wrote:
  2828.  
  2829. > In article <19961129214011881488@buf-ny3-51.ix.netcom.com>,
  2830. > cbarron3@ix.netcom.com wrote:
  2831. > >        *x = strlen(x+1);
  2832. > >        return x;
  2833. OOPS!!! these x's should be buffers's. Sorry for typos!!
  2834. > >}
  2835. > One thing I've always wondered, that no one seems to know (I guess I'll
  2836. > have to try)...
  2837. > Will this method be friendly with the settings in the Numbers control
  2838. > panel?  What if a comma or other character is used instead of a period?
  2839. > Bye!
  2840.  Probably not. Possibly...
  2841.  
  2842. +++++++++++++++++++++++++++
  2843.  
  2844. >From David Gillies <daggilli@vader.brad.ac.uk>
  2845. Date: Wed, 04 Dec 1996 14:31:48 +0000
  2846. Organization: University of Bradford
  2847.  
  2848. Sean McBride wrote:
  2849. > In article <19961129214011881488@buf-ny3-51.ix.netcom.com>,
  2850. > cbarron3@ix.netcom.com wrote:
  2851. > >#include <stdio.h>
  2852. > >#include <string.h>
  2853. > >/* convert double to a pascal string - 100% ansi C - adjust format
  2854. > >string below [in sprintf() to taste */
  2855. > >char *fl2pas(double x,char *buffer)
  2856. > >{
  2857. > >        sprintf(buffer+1,"%f10.6",x);
  2858. > >        *x = strlen(x+1);
  2859. > >        return x;
  2860. > >}
  2861. > One thing I've always wondered, that no one seems to know (I guess I'll
  2862. > have to try)...
  2863. > Will this method be friendly with the settings in the Numbers control
  2864. > panel?  What if a comma or other character is used instead of a period?
  2865. > Bye!
  2866. >
  2867. You are quite right - to be thoroughly worldwide compatible you'll
  2868. need to use the International Utilities which handle this in a
  2869. friendly fashion.
  2870. -- 
  2871. ______________________________________________________________________
  2872. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  2873.       University of Bradford, Bradford, West Yorkshire, England
  2874. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  2875.  
  2876. ---------------------------
  2877.  
  2878. >From sandor@a.crl.com (sandor)
  2879. Subject: [Q] Rebooting from MacsBug
  2880. Date: Fri, 29 Nov 1996 09:23:48 -0800
  2881. Organization: none
  2882.  
  2883.  
  2884. There is a RAM address xxxxxxxx so that in MacsBug the command
  2885.  
  2886.   g xxxxxxxx
  2887.  
  2888. will often reboot when all else (es, rs, rb) fails. Have used it
  2889. in the past and needed it the other day but could not find where
  2890. I'd written it down. If someone can help, I would appreciate it.   
  2891.  
  2892. Sandor            <sandor@a.crl.com>             Fri 29 Nov 1996
  2893.  
  2894. +++++++++++++++++++++++++++
  2895.  
  2896. >From blob@ricochet.NOSPAM.net
  2897. Date: Fri, 29 Nov 1996 14:02:59 -0700
  2898. Organization: (none)
  2899.  
  2900. In article <sandor-2911960923480001@165.113.1.24>, sandor@a.crl.com
  2901. (sandor) wrote:
  2902.  
  2903. > There is a RAM address xxxxxxxx so that in MacsBug the command
  2904. >   g xxxxxxxx
  2905. > will often reboot when all else (es, rs, rb) fails. 
  2906.  
  2907. ROMBase+A will work on most machines.  The PCI Macs seem to have messed this up.
  2908.  
  2909. -- 
  2910. (Pointers to other Mac programming web sites at
  2911. <http://devworld.apple.com/dev/geeks.html>)
  2912.  
  2913. To reply personally, take the anti-spam part, "NOSPAM." out of my email address.
  2914.  
  2915. +++++++++++++++++++++++++++
  2916.  
  2917. >From BHuey@worldnet.att.net (Hugh Johnson)
  2918. Date: Sun, 01 Dec 1996 10:47:24 -0600
  2919. Organization: Semplice
  2920.  
  2921. In article <blob-ya023480002911961402590001@news.ricochet.net>,
  2922. blob@ricochet.NOSPAM.net wrote:
  2923.  
  2924. > In article <sandor-2911960923480001@165.113.1.24>, sandor@a.crl.com
  2925. > (sandor) wrote:
  2926. > > There is a RAM address xxxxxxxx so that in MacsBug the command
  2927. > > 
  2928. > >   g xxxxxxxx
  2929. > > 
  2930. > > will often reboot when all else (es, rs, rb) fails. 
  2931. > ROMBase+A will work on most machines.  The PCI Macs seem to have
  2932. >  messed this up.
  2933.  
  2934. What about shutting down instead of rebooting? Sometimes when you have a
  2935. bomb at the end of the day, or just at the end of a frustrating session
  2936. when it's time to go take a long walk, you'd rather shut down than reboot.
  2937. Is there a way to do that?
  2938.  
  2939. +++++++++++++++++++++++++++
  2940.  
  2941. >From blob@ricochet.NOSPAM.net
  2942. Date: Sun, 01 Dec 1996 10:59:14 -0700
  2943. Organization: (none)
  2944.  
  2945. In article
  2946. <BHuey-0112961047240001@225.minnesota-002.mn.dial-access.att.net>,
  2947. BHuey@worldnet.att.net (Hugh Johnson) wrote:
  2948.  
  2949. > > > There is a RAM address xxxxxxxx so that in MacsBug the command
  2950. > > > 
  2951. > > >   g xxxxxxxx
  2952. > > > 
  2953. > > > will often reboot when all else (es, rs, rb) fails. 
  2954. > > 
  2955. > > ROMBase+A will work on most machines.  The PCI Macs seem to have
  2956. > >  messed this up.
  2957. > What about shutting down instead of rebooting?
  2958.  
  2959. g _Power
  2960.  
  2961. works for me.
  2962.  
  2963. Note to the unexperienced: This is all a _bad_ idea.  You are shutting down
  2964. without giving the OS a chance to flush any volume information in memory. 
  2965. You can easily corrupt your hard disk by doing this.  Use "rs" if you are
  2966. in Macsbug to flush and restart, then do a normal shutdown.  It's much
  2967. safer.
  2968.  
  2969. -- 
  2970. (Pointers to other Mac programming web sites at
  2971. <http://devworld.apple.com/dev/geeks.html>)
  2972.  
  2973. To reply personally, remove the anti-spam "NOSPAM." from the email address
  2974. in the header.
  2975.  
  2976. +++++++++++++++++++++++++++
  2977.  
  2978. >From chris-b@cs.auckland.ac.nz (chris-b)
  2979. Date: Mon, 02 Dec 1996 11:56:35 +1300
  2980. Organization: Auckland University HMU
  2981.  
  2982. In article <sandor-2911960923480001@165.113.1.24>, sandor@a.crl.com
  2983. (sandor) wrote:
  2984.  
  2985. >There is a RAM address xxxxxxxx so that in MacsBug the command
  2986. >
  2987. >  g xxxxxxxx
  2988. >
  2989. >will often reboot when all else (es, rs, rb) fails. Have used it
  2990. >in the past and needed it the other day but could not find where
  2991. >I'd written it down. If someone can help, I would appreciate it.   
  2992.  
  2993. On my IIsi, "g power" shuts the machine down immediately. 
  2994.  
  2995. Chris B
  2996. - ---------------------------------------------------------------------
  2997. NewZealand:AucklandUniversity:ComputerScience:HyperMediaUnit:ChrisBurns
  2998. Internet: chris-b@cs.auckland.ac.nz
  2999. Phone:    +64 9 373-7599 x8976
  3000. Fax:      +64 9 373-7453                         Async, Therefore I Am.
  3001. - ---------------------------------------------------------------------
  3002.  
  3003. +++++++++++++++++++++++++++
  3004.  
  3005. >From Mark Simpson <M.Simpson-CSSE96@cs.bham.ac.uk>
  3006. Date: Mon, 02 Dec 1996 11:35:11 +0000
  3007. Organization: School of Computer Science, University of Birmingham, UK
  3008.  
  3009. Hugh Johnson wrote:
  3010. > In article <blob-ya023480002911961402590001@news.ricochet.net>,
  3011. > blob@ricochet.NOSPAM.net wrote:
  3012. > > In article <sandor-2911960923480001@165.113.1.24>, sandor@a.crl.com
  3013. > > (sandor) wrote:
  3014. > >
  3015. > > > There is a RAM address xxxxxxxx so that in MacsBug the command
  3016. > > >
  3017. > > >   g xxxxxxxx
  3018. > > >
  3019. > > > will often reboot when all else (es, rs, rb) fails.
  3020. > >
  3021. > > ROMBase+A will work on most machines.  The PCI Macs seem to have
  3022. > >  messed this up.
  3023. > >
  3024. > What about shutting down instead of rebooting? Sometimes when you have a
  3025. > bomb at the end of the day, or just at the end of a frustrating session
  3026. > when it's time to go take a long walk, you'd rather shut down than reboot.
  3027. > Is there a way to do that?
  3028.  
  3029. Probably not. The system needs to do certain housekeeping tasks when you
  3030. shut down, and if the system has crashed, it's not likely to be in any
  3031. position to do its stuff. Personally, I just restart with the shiftkey
  3032. down - only takes thirty seconds, then go for a pint!
  3033.  
  3034. Mark
  3035.  
  3036. -- 
  3037. **************************************************************
  3038. **   Mark Simpson (M.Simpson-csse96@cs.bham.ac.uk)
  3039. **   Computer Science / Software Engineering 1
  3040. **   University of Birmingham, UK
  3041. **
  3042. **   "Who is and who isn't?"
  3043. **************************************************************
  3044.  
  3045. ---------------------------
  3046.  
  3047. >From g-kendall@nwu.edu (Brian Kendall)
  3048. Subject: [Q] Setting the cursor location?
  3049. Date: Thu, 28 Nov 1996 09:19:04 -0400
  3050. Organization: Programmer
  3051.  
  3052.  
  3053. Hi there!
  3054.  
  3055. I need to know how to set the cursor location. Any ideas? Toolbox
  3056. functions? Source code? Web sites? Just let me know if you have something.
  3057.  
  3058. Brian K.
  3059.  
  3060. Have a nice day :)
  3061.  
  3062. +++++++++++++++++++++++++++
  3063.  
  3064. >From bilewicz@helf4.physik.fu-berlin.de (Roger Bilewicz)
  3065. Date: 3 Dec 96 12:33:57 GMT
  3066. Organization: Freie Universitaet Berlin
  3067.  
  3068. g-kendall@nwu.edu (Brian Kendall) writes:
  3069.  
  3070.  
  3071. >Hi there!
  3072.  
  3073. >I need to know how to set the cursor location. Any ideas? Toolbox
  3074. >functions? Source code? Web sites? Just let me know if you have something.
  3075.  
  3076. >Brian K.
  3077.  
  3078. >Have a nice day :)
  3079.  
  3080.  
  3081. Hi Brian,
  3082.  
  3083. The only one who is allowed to move the cursor is the user.
  3084.  
  3085. Accordingly, there is no toolbox call for this. 
  3086.  
  3087. Further reference: Macintosh Human Interface Guidelines .
  3088.  
  3089. Roger
  3090.  
  3091. +++++++++++++++++++++++++++
  3092.  
  3093. >From David Gillies <daggilli@vader.brad.ac.uk>
  3094. Date: Wed, 04 Dec 1996 16:57:15 +0000
  3095. Organization: University of Bradford
  3096.  
  3097. Roger Bilewicz wrote:
  3098. > g-kendall@nwu.edu (Brian Kendall) writes:
  3099. > >Hi there!
  3100. > >I need to know how to set the cursor location. Any ideas? Toolbox
  3101. > >functions? Source code? Web sites? Just let me know if you have something.
  3102. > >Brian K.
  3103. > >Have a nice day :)
  3104. > Hi Brian,
  3105. > The only one who is allowed to move the cursor is the user.
  3106. > Accordingly, there is no toolbox call for this.
  3107. > Further reference: Macintosh Human Interface Guidelines .
  3108. > Roger
  3109. This is true. It is also false.
  3110.  
  3111. You can jam values into a couple of low-mem globals to set the
  3112. cursor location and then another one to tell the system what
  3113. you've dome. I do this in a joke FBA I wrote which moves the cursor
  3114. about in a Time Manager task.
  3115. -- 
  3116. ______________________________________________________________________
  3117. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  3118.       University of Bradford, Bradford, West Yorkshire, England
  3119. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  3120.  
  3121. +++++++++++++++++++++++++++
  3122.  
  3123. >From rolfe@sfu.ca (cj)
  3124. Date: 7 Dec 1996 11:17:55 GMT
  3125. Organization: Simon Fraser University
  3126.  
  3127.  
  3128. Roger Bilewicz wrote:
  3129.    >>I need to know how to set the cursor location. Any ideas? Toolbox
  3130.    >>functions? Source code? Web sites? Just let me know if you have something.
  3131.  
  3132. and someone responded with the Apple approved bad news:
  3133.  
  3134.    <Name blanked to protect the well-intentioned>
  3135.    >>The only one who is allowed to move the cursor is the user.
  3136.    >>Accordingly, there is no toolbox call for this. 
  3137.  
  3138. In fact, it's fairly easy to set the cursor. Hide the cursor, call
  3139. MoveMouse() (function below), and show the cursor.
  3140. Overriding the user input is tricky. You can never beat the user-generated
  3141. interrupt that moves the cursor unless
  3142. you decouple the mouse from the cursor. 
  3143.  
  3144. I don't know the Apple tech note number but the response and query was:
  3145.  
  3146. Response:  "Updating Macintosh cursor without mouse competition"
  3147. Date Written: 6/12/91
  3148. Last reviewed: 6/14/93 
  3149. Query:  "How can I programmatically move the Macintosh mouse without the
  3150. real mouse interfering?"
  3151.  
  3152. Mouse tricks code follows:
  3153.  
  3154. // Function prototypes
  3155. void MoveMouse(Point pt);
  3156. void MouseCouple();
  3157. void MouseDecouple();
  3158.  
  3159. // static globals -- low memory mouse globals
  3160.  char *CrsrCouple = (char *) 0x8CF;
  3161.  Point*  gRawMouse    = (Point*) 0x082C;
  3162. Point*   gTemp     = (Point*) 0x0828;
  3163. char* gMouseNew   = (char*) 0x08CE;
  3164. char* gCouple   = (char*) 0x08CF;
  3165.  
  3166. void 
  3167. MoveMouse(Point pt) 
  3168. {
  3169.       gRawMouse->v = mTemp->v = pt.v;
  3170.       gRawMouse->h = mTemp->h = pt.h;        
  3171.       *gMouseNew = 1;        
  3172. }
  3173. void
  3174. MouseCouple()
  3175. {
  3176.       char *CrsrCouple = (char *) 0x8CF;
  3177.       *CrsrCouple = 1;     
  3178. }
  3179. void
  3180. MouseDecouple()
  3181. {
  3182.       char *CrsrCouple = (char *) 0x8CF;
  3183.       *CrsrCouple = 0;     
  3184. }
  3185.  
  3186. Chris
  3187. rolfe@sfu.ca
  3188.  
  3189. ---------------------------
  3190.  
  3191. >From ghinkle@pixmap.seas.upenn.edu (Gregory J Hinkle)
  3192. Subject: [Q] Time of last key down?
  3193. Date: 6 Dec 1996 18:33:53 GMT
  3194. Organization: University of Pennsylvania
  3195.  
  3196. I've been working on an application that acts as a screen saver. I've 
  3197. been able to set up switching processes and all after a certian period of 
  3198. mouse inactivity. Does anyone know of a way to check when the last key 
  3199. was pressed(even in another process). Would I have to patch the event 
  3200. handler?
  3201.  
  3202. BTW, the project I'm working on is called Let It Snow. Its a screen 
  3203. saver/ background animatior for the holiday season. You can find the 
  3204. latest beta version at the address in my sig. Note: it still has the 
  3205. screen saver part disabled until I can figure this keydown event stuff.
  3206.  
  3207. --
  3208. http://www.seas.upenn.edu/~ghinkle/prog.html
  3209. ghinkle@seas.upenn.edu
  3210.  
  3211. +++++++++++++++++++++++++++
  3212.  
  3213. >From blob@ricochet.NOSPAM.net
  3214. Date: Sat, 07 Dec 1996 11:30:11 -0700
  3215. Organization: (none)
  3216.  
  3217. In article <589ouh$ufv@netnews.upenn.edu>, ghinkle@pixmap.seas.upenn.edu
  3218. (Gregory J Hinkle) wrote:
  3219.  
  3220. > I've been working on an application that acts as a screen saver. I've 
  3221. > been able to set up switching processes and all after a certian period of 
  3222. > mouse inactivity. Does anyone know of a way to check when the last key 
  3223. > was pressed(even in another process). Would I have to patch the event 
  3224. > handler?
  3225.  
  3226. There is a low memory global called KeyTime which returns the time in ticks
  3227. since the last keypress.  It's at location $186.
  3228.  
  3229. I don't believe there is a low memory accessor function for this value in
  3230. LowMem.h.  Beware future compatbility.
  3231.  
  3232. Other than that, a jGNEFilter as described in technote 1060 at
  3233. <http://devworld.apple.com/dev/technotes/tn/tn1060.html>
  3234.  
  3235. -- 
  3236. (Pointers to other Mac programming web sites at
  3237. <http://devworld.apple.com/dev/geeks.html>)
  3238.  
  3239. To reply personally, remove the anti-spam "NOSPAM." from the email address
  3240. in the header.
  3241.  
  3242. +++++++++++++++++++++++++++
  3243.  
  3244. >From bc@apple.com (bill coderre)
  3245. Date: Sun, 08 Dec 1996 19:37:28 -0800
  3246. Organization: This posting does not represent the official opinion of Apple Computer, Inc.
  3247.  
  3248. ghinkle@pixmap.seas.upenn.edu (Gregory J Hinkle) wrote:
  3249. |   I've been working on an application that acts as a screen saver. I've 
  3250. |   been able to set up switching processes and all after a certian period of 
  3251. |   mouse inactivity. Does anyone know of a way to check when the last key 
  3252. |   was pressed(even in another process). Would I have to patch the event 
  3253. |   handler?
  3254. |   
  3255. |   BTW, the project I'm working on is called Let It Snow. Its a screen 
  3256. |   saver/ background animatior for the holiday season. You can find the 
  3257. |   latest beta version at the address in my sig. Note: it still has the 
  3258. |   screen saver part disabled until I can figure this keydown event stuff.
  3259.  
  3260. Why not write a plug in module for After Dark or Dark Side of the Mac?
  3261.  
  3262. The latter is free software and works good. Tom Dowdy, famous Apple
  3263. engineer (if you stand on your head) wrote it.
  3264.  
  3265. bc
  3266. -- 
  3267. This posting in no way represents the official opinion of Apple Computer,
  3268. Inc. Contact me at bc@wetware.com or bc@apple.com to discuss my personal
  3269. opinions and those of Apple Computer, Inc. Have a Nice Day.
  3270.  
  3271. ---------------------------
  3272.  
  3273. >From jsoltys@woodinville.com (John Soltys)
  3274. Subject: [Q] disposing handles to structs
  3275. Date: Mon, 02 Dec 1996 20:35:49 -0800
  3276. Organization: The Edwards Agency
  3277.  
  3278. I have a struct which contains a couple of pointers. When I am done with
  3279. the struct, can I call DisposeHandle ((Handle) myStructHandle) and be done
  3280. with it or do I have to dispose of each pointer within the struct before I
  3281. deallocate the struct's handle?
  3282.  
  3283. +++++++++++++++++++++++++++
  3284.  
  3285. >From Bill McElmury <bill@jmcinc.com>
  3286. Date: Tue, 03 Dec 1996 09:24:26 -0600
  3287. Organization: JMC Inc
  3288.  
  3289. John Soltys wrote:
  3290. > I have a struct which contains a couple of pointers. When I am done with
  3291. > the struct, can I call DisposeHandle ((Handle) myStructHandle) and be done
  3292. > with it or do I have to dispose of each pointer within the struct before I
  3293. > deallocate the struct's handle?
  3294.  
  3295. John,
  3296. If the pointers inside the struct are pointing to memory that YOU
  3297. allocated (NewPtr,malloc,etc...) then yes, you have to dispose of the
  3298. allocated memory chunks (DisposPtr,free,...) before you deallocate the
  3299. struct's handle.  Otherwise you end up with allocated memory chunks
  3300. stuck permanently in your heap.
  3301. Hope this helps.
  3302. Bill
  3303. -- 
  3304. __________________________________________________
  3305. Bill McElmury                   Bill :612-345-6218
  3306. JMC Inc                         John :800-524-8182
  3307. PO Box 328                      fax  :612-345-2215
  3308. Lake City, MN 55041
  3309.  
  3310. +++++++++++++++++++++++++++
  3311.  
  3312. >From David Gillies <daggilli@vader.brad.ac.uk>
  3313. Date: Wed, 04 Dec 1996 16:33:25 +0000
  3314. Organization: University of Bradford
  3315.  
  3316. John Soltys wrote:
  3317. > I have a struct which contains a couple of pointers. When I am done with
  3318. > the struct, can I call DisposeHandle ((Handle) myStructHandle) and be done
  3319. > with it or do I have to dispose of each pointer within the struct before I
  3320. > deallocate the struct's handle?
  3321.  
  3322. It all depends on whether you allocated the objects that the pointers
  3323. point to, and whether you need those objects to hang around after 
  3324. you've disposed of the outer structure.
  3325.  
  3326. E.g. : say you've ccoked up a space-saving replacement for an FSSpec:
  3327.  
  3328. typedef struct MyFSSpec
  3329. {
  3330. short   vRefNum;
  3331. long    parID;
  3332. unsigned char *name; // instead of Str63
  3333. }MyFSSpec;
  3334.  
  3335. typedef MyFSSpec *MyFSSpecPtr,**MyFSSpecHandle;
  3336.  
  3337. MyFSSpecHandle     fssHand;
  3338. Str63              fName="\pshort name";
  3339.  
  3340. // allocate the memeory for the struct
  3341. fssHand=(MyFSSpecHandle)NewHandle(sizeof(MyFSSpec));
  3342.  
  3343. HLockHi((Handle)fssHand);
  3344. (*fssHand)->vRefNum=-1;
  3345. (*fssHand)->parID=23764;
  3346. (*fssHand)->name=(unsigned char*)NewPtr(fName[0]+1);
  3347. HUnlock((Handle)fssHand);
  3348.  
  3349.  
  3350. // use it ...
  3351.  
  3352. ...
  3353. ...
  3354.  
  3355. // dispose of it
  3356.  
  3357. HLockHi((Handle)fssHand);
  3358. DisposePtr((Ptr)(*fssHand)->name);
  3359. HUnlock(fssHand);
  3360. DisposeHandle((Handle)fssHand);
  3361.  
  3362. If all your DisposeHandle/Ptr calls match all your NewHandle/Ptr
  3363. calls then all will be well. If this is not the case then
  3364. somewhere there will be trouble.
  3365.  
  3366. Note also that these days people tend to prefer to use pointers
  3367. not handles - all that locking and unlocking just so you can 
  3368. drop a dereference stage...
  3369.  
  3370. As someone pointed out the other day, the MMU should be used
  3371. to give heap relocatability, not the Memory Manager.
  3372. -- 
  3373. ______________________________________________________________________
  3374. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  3375.       University of Bradford, Bradford, West Yorkshire, England
  3376. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  3377.  
  3378. +++++++++++++++++++++++++++
  3379.  
  3380. >From spamwall@zercom.net (Martin-Gilles Lavoie)
  3381. Date: 4 Dec 1996 21:27:17 GMT
  3382. Organization: Groupimage, inc.
  3383.  
  3384. In article <jsoltys-0212962035490001@ppp-3-157.connect.com>,
  3385. jsoltys@woodinville.com (John Soltys) wrote:
  3386.  
  3387. > I have a struct which contains a couple of pointers. When I am done with
  3388. > the struct, can I call DisposeHandle ((Handle) myStructHandle) and be done
  3389. > with it or do I have to dispose of each pointer within the struct before I
  3390. > deallocate the struct's handle?
  3391.  
  3392. You must dispose the pointers in your struct before disposing of the
  3393. handle to the struct containing them.  An easy way is to map these calls
  3394. into something like this:
  3395.  
  3396. Handle NewMyStructHandle (void) {
  3397.     Handle      myStructHandle = NewHandleClear(sizeof (struct MyStruct));
  3398.     HLock(myStructHandle);
  3399.     ((MyStruct**) myStructHandle)[0]->myPtr = NewPtr(...)
  3400.     HUnlock(myStructHandle);
  3401.     return (myStructHandle);
  3402. }
  3403.  
  3404. void DisposeMyStructHandle(Handle      &myStructHandle) {
  3405.     
  3406.     if (myStructHandle[0]->myPtr) {
  3407.         DisposePtr(myStructHandle[0]->myPtr);
  3408.         myStructHandle[0]->myPtr = nil; 
  3409.     }
  3410.     DisposeHandle(myStructHandle);
  3411.     myStructHandle = nil;
  3412. }
  3413.  
  3414. >From your code, rather than calling NewHandleX and DisposeHandle, you'd
  3415. make these calls:
  3416.  
  3417.     Handle      myHandle    =    NewMyStructHandle();
  3418.  
  3419.     //...
  3420.  
  3421.      DisposeMyStructHandle(myStructHandle);
  3422.  
  3423. Note that if you're using C rather than C++, you'd have to change the
  3424. second function to this:
  3425.  
  3426. void DisposeMyStructHandle(Handle      *myStructHandle) {
  3427.     
  3428.     if ((*myStructHandle)[0]->myPtr) {
  3429.         DisposePtr((*myStructHandle)[0]->myPtr);
  3430.        (*myStructHandle)[0]->myPtr = nil; 
  3431.     }
  3432.     DisposeHandle((*myStructHandle));
  3433.    (*myStructHandle) = nil;
  3434. }
  3435. =================================================================
  3436. Please reply using the following address, rather than the
  3437. "reply-to" address (my mail box is being filled with junk mail).
  3438. =================================================================
  3439. Martin-Gilles Lavoie  |  Opinions expressed herein are just that.
  3440. mouser@zercom.net     |  "No! Do, or do not.  There is no try."
  3441. Globimage, inc.       |         --Yoda on error handling
  3442.  
  3443. ---------------------------
  3444.  
  3445. >From chris@buran.fb10.tu-berlin.de (Christian Nieber)
  3446. Subject: [Q] library-class library for easier MacOS programming?
  3447. Date: 27 Nov 1996 00:10:23 GMT
  3448. Organization: Institut fuer Energietechnik, TU-Berlin
  3449.  
  3450. We are looking for a library to simplify porting a large standard software 
  3451. application in plain ANSI C to MacOS. Actually we have made our own portable 
  3452. GUI interface, which currently exists on OS/2 and Atari-GEM (32 bit Windows 
  3453. is also planned), and now we want to make a MacOS version of it. Direct Mac 
  3454. Toolbox programming seems a bit awkward to me, so I am looking for something 
  3455. that takes care of the routine stuff. Our requirements are:
  3456.  
  3457.  - source code must be available
  3458.  - must allow for good Mac look&feel
  3459.  - speed and code size is an issue, so there should not be too much overhead
  3460.  - can be commercial, shareware or whatever
  3461.  - in the best case it should handle (modeless) dialogs, windows, drawing, 
  3462. printing, and as many protocols as possible (Clipboard, drag&drop, EasyOpen, 
  3463. OpenDoc etc.). Vector and bitmap graphics would be a plus.
  3464.  
  3465. Some people have recommended me to use PowerPlant, but that seems like quite 
  3466. an overkill to me, since it's much to learn and much overhead, and after all 
  3467. we already have our own GUI programming model. Isn't there something smaller 
  3468. and preferably in C out there?
  3469.  
  3470. - -------------------------------------------------------------------
  3471.  Christian Nieber  (R.O.M. logicware)       +-----------------+
  3472.  email chris@buran.fb10.tu-berlin.de        | Always plan ahea|
  3473.  Neue Bergstr. 5, D-13585 Berlin, Germany   |________________d|
  3474.  Tel. ++49 / 30 / 335 79 00                         | |
  3475. - -------------------------------------------------------------------
  3476.  
  3477.  
  3478. +++++++++++++++++++++++++++
  3479.  
  3480. >From blasirs@franklin.CS.Berkeley.EDU (Robert_S Blasi)
  3481. Date: 30 Nov 1996 23:30:16 GMT
  3482. Organization: University of California, Berkeley
  3483.  
  3484. In article <57g0tf$ipc@brachio.zrz.TU-Berlin.DE>,
  3485. Christian Nieber <chris@buran.fb10.tu-berlin.de> wrote:
  3486. >We are looking for a library to simplify porting a large standard software 
  3487. >application in plain ANSI C to MacOS. Actually we have made our own portable 
  3488. >GUI interface, which currently exists on OS/2 and Atari-GEM (32 bit Windows 
  3489. >is also planned), and now we want to make a MacOS version of it. Direct Mac 
  3490. >Toolbox programming seems a bit awkward to me, so I am looking for something 
  3491. >that takes care of the routine stuff. Our requirements are:
  3492. >
  3493. > - source code must be available
  3494. > - must allow for good Mac look&feel
  3495. > - speed and code size is an issue, so there should not be too much overhead
  3496. > - can be commercial, shareware or whatever
  3497. > - in the best case it should handle (modeless) dialogs, windows, drawing, 
  3498. >printing, and as many protocols as possible (Clipboard, drag&drop, EasyOpen, 
  3499. >OpenDoc etc.). Vector and bitmap graphics would be a plus.
  3500. >
  3501. >Some people have recommended me to use PowerPlant, but that seems like quite 
  3502. >an overkill to me, since it's much to learn and much overhead, and after all 
  3503. >we already have our own GUI programming model. Isn't there something smaller 
  3504. >and preferably in C out there?
  3505.  
  3506.  
  3507.     Hm. You might want to head to the bookstore and look for
  3508. "Programming Starter Kit" by Jim Trudeau. I remember that he developed
  3509. a simple framework in C in this book called "EasyApp" that supported
  3510. most of the things you listed above. I have no idea what the restrictions
  3511. on its use and distribution are; you'd probably have to contact the author
  3512. But if you want to get an idea of how to handle the routine stuff, it
  3513. might be a good place to start.
  3514.  
  3515.  
  3516.  
  3517.                         VTY, Rob Blasi
  3518. -- 
  3519. | Robert S. Blasi                    |  "The mind is not a vessel to be   |
  3520. | Drexel University, B.S.E.E '95     |   filled, but a fire to be lit."   |
  3521. | M.S. candidate, Berkeley, Robotics |                   --Plutarch       |
  3522. +-----------------http://www.cs.berkeley.edu/~blasirs---------------------+
  3523.  
  3524. +++++++++++++++++++++++++++
  3525.  
  3526. >From msbishop@ix.netcom.com (Matt Bishop)
  3527. Date: Fri, 06 Dec 1996 00:42:16 -0500
  3528. Organization: Zip News
  3529.  
  3530. >>We are looking for a library to simplify porting a large standard software 
  3531. >>application in plain ANSI C to MacOS. Actually we have made our own portable 
  3532. >>GUI interface, which currently exists on OS/2 and Atari-GEM (32 bit Windows 
  3533. >>is also planned), and now we want to make a MacOS version of it. Direct Mac 
  3534. >>Toolbox programming seems a bit awkward to me, so I am looking for something 
  3535. >>that takes care of the routine stuff. Our requirements are:
  3536. >>
  3537. >> - source code must be available
  3538. >> - must allow for good Mac look&feel
  3539. >> - speed and code size is an issue, so there should not be too much overhead
  3540. >> - can be commercial, shareware or whatever
  3541. >> - in the best case it should handle (modeless) dialogs, windows, drawing, 
  3542. >>printing, and as many protocols as possible (Clipboard, drag&drop, EasyOpen, 
  3543. >>OpenDoc etc.). Vector and bitmap graphics would be a plus.
  3544. >>
  3545. >>Some people have recommended me to use PowerPlant, but that seems like quite 
  3546. >>an overkill to me, since it's much to learn and much overhead, and after all 
  3547. >>we already have our own GUI programming model. Isn't there something smaller 
  3548. >>and preferably in C out there?
  3549. >
  3550.  
  3551. Another option is MacZoop.  It is a C++ framework, but it is very, very
  3552. small, <80K compiled.  The newest version (1.5) handles most of the
  3553. protocols and functionality you are looking for.  It is free, too.
  3554.  
  3555. http://www.warwick.ac.uk/~corbe/MacZoop/MacZoop.html
  3556.  
  3557.  
  3558. You will still have to learn the Toolbox, though.  Sorry, there isn't
  3559. anything out there that lets you avoid that completely.
  3560.  
  3561. -- 
  3562. Matt Bishop
  3563. msbishop@ix.netcom.com
  3564.  
  3565. ---------------------------
  3566.  
  3567. >From balindauer@aol.com
  3568. Subject: [Q]:  Patching _Launch?
  3569. Date: 2 Dec 1996 09:03:10 GMT
  3570. Organization: AOL http://www.aol.com
  3571.  
  3572. I'm writing an INIT that will take some action when an application is
  3573. launched.  So I'm trying to patch the _Launch trap, and it isn't
  3574. working...  Any idea what I'm doing wrong?
  3575.  
  3576. Code is thus:
  3577.  
  3578. 8<------------------------------ cut here
  3579. pascal OSErr (*gOldLaunch)(LaunchPBPtr launchPB);
  3580. pascal OSErr MyLaunch( LaunchPBPtr launchPB);
  3581.  
  3582. enum {
  3583.     uppLaunchApplicationProcInfo = kRegisterBased 
  3584.         | RESULT_SIZE( SIZE_CODE( sizeof( OSErr))) 
  3585.         | REGISTER_RESULT_LOCATION( kRegisterD0)
  3586.         | REGISTER_ROUTINE_PARAMETER(1, kRegisterA0,
  3587. SIZE_CODE(sizeof(LaunchPBPtr)))
  3588. };
  3589.  
  3590. void main(void)
  3591. {
  3592.     THz oldZone;
  3593.  
  3594.     oldZone = GetZone();
  3595.     SetZone(SystemZone());
  3596.     
  3597.     DetachResource(GetResource('INIT', -4050));
  3598.     
  3599.     gOldLaunch = (void *) GetToolTrapAddress( _Launch);
  3600.     SetToolTrapAddress( NewRoutineDescriptor((ProcPtr) MyLaunch,
  3601. uppLaunchApplicationProcInfo, kPowerPCISA), _Launch);
  3602.  
  3603.     SetZone(oldZone);
  3604. }
  3605.  
  3606. pascal OSErr MyLaunch( LaunchPBPtr launchPB)
  3607. {
  3608.     short result;
  3609.     
  3610.     SysBeep(10);
  3611.  
  3612.     result = CallUniversalProc((UniversalProcPtr) gOldLaunch,
  3613. uppLaunchApplicationProcInfo, launchPB);
  3614.     
  3615.     return result;
  3616. }
  3617. 8<-------------------------------- cut here
  3618.  
  3619. When I run this, it seems to work the first time (when Finder is
  3620. launched), but not after that.  I'm a little mystified on how this should
  3621. work, because _Launch is a register based trap, expecting a
  3622. LaunchParamBlockRecPtr in A0.  But this is PowerPC native code, so there
  3623. is no A0...
  3624.  
  3625. Please Help!  Thanks in advance...
  3626.  
  3627. --Bradley
  3628. balindauer@aol.com
  3629.  
  3630. +++++++++++++++++++++++++++
  3631.  
  3632. >From blob@ricochet.NOSPAM.net
  3633. Date: Mon, 02 Dec 1996 07:58:14 -0700
  3634. Organization: (none)
  3635.  
  3636. In article <19961202090400.EAA09481@ladder01.news.aol.com>,
  3637. balindauer@aol.com wrote:
  3638.  
  3639. > I'm writing an INIT that will take some action when an application is
  3640. > launched.  So I'm trying to patch the _Launch trap, and it isn't
  3641. > working...  Any idea what I'm doing wrong?
  3642.  
  3643. _Launch is one of several traps which are replaced when the process manager
  3644. starts up.  This means that you have to patch a different trap and wait for
  3645. the process manager to start; then you can patch _Launch.
  3646.  
  3647. I use _InitMenus as my preliminary trap.  In the patch to _InitMenus, I
  3648. check if the trap _OSDispatch is implemented.  If so, then the process
  3649. manager is running, and I can safely patch _Launch.
  3650.  
  3651. /*
  3652. *
  3653. * PatchLaunch
  3654. *
  3655. * An example of patching _Launch trap.  Since the Process Manager overwrites
  3656. * _Launch, we patch InitMenus and wait until _Launch is patched.
  3657. * We then check that _OSDispatch is implemented.  If it is, we assume that 
  3658. * the Process Manager is up, and we can safely patch _Launch.
  3659. *
  3660. */
  3661.  
  3662. /* #include files */
  3663. #include <A4Stuff.h>
  3664. #include <SetupA4.h>
  3665. #include <SegLoad.h>
  3666. #include <Traps.h>
  3667. #include <Processes.h>
  3668. #include <Events.h>
  3669.  
  3670. enum {
  3671.    kINITid = 0,
  3672.    kCapsLockKey = 0x39
  3673. };
  3674.  
  3675. /* InitMenus patch stuff */
  3676.  
  3677. typedef pascal void (*InitMenusProc)(void);
  3678. pascal void InitMenusPatch(void);
  3679. InitMenusProc  gOldInitMenusAddr = nil;
  3680.  
  3681. /* Launch patch stuff */
  3682.  
  3683. asm pascal void LaunchPatch(void);
  3684. typedef pascal void (*LaunchProc)(void);
  3685. LaunchProc  gOldLaunchAddr = nil;
  3686.  
  3687.  
  3688. /* main */
  3689.  
  3690. void main(void)
  3691. {
  3692.    Handle   h;
  3693.    long  oldA4;
  3694.    
  3695.    /* Set up our A4 context for this file */
  3696.    oldA4 = SetCurrentA4();
  3697.    RememberA4();
  3698.  
  3699.    /* detach ourselves */
  3700.    h = Get1Resource('INIT', kINITid);
  3701.    if (h)
  3702.       DetachResource(h);
  3703.  
  3704.    /* patch InitMenus */
  3705.    gOldInitMenusAddr = (InitMenusProc)GetToolTrapAddress(_InitMenus);
  3706.    SetToolTrapAddress((UniversalProcPtr)InitMenusPatch, _InitMenus);
  3707.    
  3708.    /* Restore the A4 world */
  3709.    SetA4(oldA4);
  3710.    
  3711.    /* That's it for the actual INIT code */
  3712. }
  3713.  
  3714.  
  3715. /*
  3716.  * InitMenusPatch 
  3717.  *
  3718.  * This is patch which exists only until the process manager is up.
  3719.  * Check that the OSDispatch trap is implemented.  When it is, patch
  3720.  * Launch and remove ourself so we don't patch Launch a second time.
  3721.  */
  3722.  
  3723. pascal void InitMenusPatch(void)
  3724. {
  3725.    long oldA4;
  3726.    
  3727.    oldA4 = SetUpA4();
  3728.       
  3729.    if ( GetToolTrapAddress(_OSDispatch) != 
  3730.         GetToolTrapAddress(_Unimplemented) )
  3731.    {
  3732.       /* OSDispatch is implemented.  Go ahead and patch Launch */
  3733.       gOldLaunchAddr = (LaunchProc)GetToolTrapAddress(_Launch);
  3734.       SetToolTrapAddress((UniversalProcPtr)LaunchPatch, _Launch);
  3735.       /* We don't need this patch anymore.  Remove it */
  3736.       SetToolTrapAddress((UniversalProcPtr)gOldInitMenusAddr, _InitMenus);
  3737.    }
  3738.  
  3739.    /* call through to the original InitMenus */
  3740.    gOldInitMenusAddr();
  3741.    
  3742.    RestoreA4(oldA4);
  3743. }
  3744.  
  3745. /*
  3746.  * LaunchPatch
  3747.  */
  3748.  
  3749. asm pascal void LaunchPatch(void)
  3750. {
  3751.    /* your code goes here */
  3752. }
  3753.  
  3754. -- 
  3755. (Pointers to other Mac programming web sites at
  3756. <http://devworld.apple.com/dev/geeks.html>)
  3757.  
  3758. To reply personally, remove the anti-spam "NOSPAM." from the email address
  3759. in the header.
  3760.  
  3761. +++++++++++++++++++++++++++
  3762.  
  3763. >From tonyn@tiac.net (Tony Nelson)
  3764. Date: Thu, 05 Dec 1996 17:06:29 -0500
  3765. Organization: <none>
  3766.  
  3767. In article <19961202090400.EAA09481@ladder01.news.aol.com>,
  3768. balindauer@aol.com wrote:
  3769.  
  3770. > I'm writing an INIT that will take some action when an application is
  3771. > launched.  So I'm trying to patch the _Launch trap, and it isn't
  3772. > working...  Any idea what I'm doing wrong?
  3773.  
  3774. No, but you might be able to patch some other trap that gets called early
  3775. in the app's startup, such as _InitGraf.
  3776. ____________________________________________________________________
  3777. TonyN.:'                                              tonyn@tiac.net
  3778.       '
  3779.  
  3780. ---------------------------
  3781.  
  3782. >From lapalut@sophia.inria.fr (Stephane Lapalut)
  3783. Subject: [Q]: recovering mac stuffit archive with NDD 3.1 ?
  3784. Date: 28 Nov 1996 09:02:41 GMT
  3785. Organization: INRIA Sophia-Antipolis
  3786.  
  3787.  Hi,
  3788.  
  3789.  I try to recover a stuffit archive accidentaly erased. Norton unerase
  3790.  give me a .data and .rsrc apparently belonging to the erased file.
  3791.  
  3792.  I have tried to put them together with resedit but the resulting file 
  3793.  still bugged for StuffitExpander.
  3794.  
  3795.  Does someone have an idea to make the things working ? Is there a way to 
  3796.  recover stuffit data without the resources ?
  3797.  
  3798.  Thanks for any suggestions,
  3799.  
  3800. Stephane
  3801.  
  3802.  
  3803. DISCLAIMER: opinions expressed here are only mime, unless specified
  3804. - --------
  3805.  StÈphane Lapalut, projet ACACIA, INRIA Sophia Antipolis, France
  3806.  http://www.inria.fr/acacia/personnel/lapalut/steph.html
  3807.  
  3808. +++++++++++++++++++++++++++
  3809.  
  3810. >From galley@texas.net (Gordon B. Alley)
  3811. Date: Thu, 28 Nov 1996 23:38:44 -0600
  3812. Organization: Texas Networking, Inc.
  3813.  
  3814. In article <57jkfh$2m3@news-sop.inria.fr>, lapalut@sophia.inria.fr wrote:
  3815.  
  3816. > Hi,
  3817. >
  3818. > I try to recover a stuffit archive accidentaly erased. Norton unerase
  3819. > give me a .data and .rsrc apparently belonging to the erased file.
  3820. >
  3821. > I have tried to put them together with resedit but the resulting file 
  3822. > still bugged for StuffitExpander.
  3823. >
  3824. > Does someone have an idea to make the things working ? Is there a way to 
  3825. > recover stuffit data without the resources ?
  3826. >
  3827. > Thanks for any suggestions,
  3828. >
  3829. >Stephane
  3830.  
  3831. Actually, I believe the resource fork isn't used for anything other than
  3832. Finder info in a .sit file.  Try taking just a copy of the .data file,
  3833. renaming it whatever.sit, and then dropping that file onto StuffIt
  3834. Expander.
  3835.  
  3836. -- 
  3837. --Gordon Alley   <*>    <galley@texas.net>
  3838.  
  3839. +++++++++++++++++++++++++++
  3840.  
  3841. >From discoco@cats.ucsc.edu (Christopher Louis Smith)
  3842. Date: 4 Dec 1996 18:48:05 GMT
  3843. Organization: University of California, Santa Cruz
  3844.  
  3845.  
  3846. In article <galley-ya023480002811962338450001@news.texas.net>,
  3847. Gordon B. Alley <galley@texas.net> wrote:
  3848. >In article <57jkfh$2m3@news-sop.inria.fr>, lapalut@sophia.inria.fr wrote:
  3849. >
  3850. >> Hi,
  3851. >>
  3852. >> I try to recover a stuffit archive accidentaly erased. Norton unerase
  3853. >> give me a .data and .rsrc apparently belonging to the erased file.
  3854. >>
  3855. >> I have tried to put them together with resedit but the resulting file 
  3856. >> still bugged for StuffitExpander.
  3857. >>
  3858. >> Does someone have an idea to make the things working ? Is there a way to 
  3859. >> recover stuffit data without the resources ?
  3860. >>
  3861. >> Thanks for any suggestions,
  3862. >>
  3863. >>Stephane
  3864.  
  3865. I think the reality here is that your recovery using Norton
  3866. was incomplete. And *especially* with .sit archives, just one
  3867. bit of data out of place will likely make the archive
  3868. unusable. So I suspect you are out of luck. Hopefully you have
  3869. a backup of your file somehere. Take care.
  3870.  
  3871. -CLS
  3872.  
  3873.  
  3874.  
  3875. ---------------------------
  3876.  
  3877. >From vince@deas.harvard.edu (Vince Darley)
  3878. Subject: code for Async File Output
  3879. Date: Tue, 26 Nov 1996 11:14:16 -0500
  3880. Organization: Harvard University
  3881.  
  3882. I currently use the basic FSRead FSWrite .. routines with FSSpecs pointing
  3883. to my files.  Since my output routines are very straightforward: I just
  3884. create/over-write two files and keeping FSWrite'ing to them (always from
  3885. the current position) and then set the EOF and close them, it struck me
  3886. this would be a good situation to speed things up by writing
  3887. asynchronously.
  3888.  
  3889. However my attempts from reading the async routines seem to crash, so I'm
  3890. looking for some sample code to do this.
  3891.  
  3892. (none seems to be on apple's source sites, although I may have missed something)
  3893.  
  3894. any help?,
  3895.  
  3896. -- 
  3897.     -********* *-
  3898.    -*  Vince  *-
  3899.   -* *********-
  3900.    
  3901. <http://www.fas.harvard.edu/~darley/>
  3902.  
  3903. +++++++++++++++++++++++++++
  3904.  
  3905. >From SouthSide@kagi.com (Bob Bradley)
  3906. Date: Tue, 26 Nov 1996 23:12:34 -0800
  3907. Organization: SPC
  3908.  
  3909. In article <vince-ya023180002611961114160001@fas-news.harvard.edu>,
  3910. vince@deas.harvard.edu (Vince Darley) wrote:
  3911.  
  3912. > I currently use the basic FSRead FSWrite .. routines with FSSpecs pointing
  3913. > to my files.  Since my output routines are very straightforward: I just
  3914. > create/over-write two files and keeping FSWrite'ing to them (always from
  3915. > the current position) and then set the EOF and close them, it struck me
  3916. > this would be a good situation to speed things up by writing
  3917. > asynchronously.
  3918. > However my attempts from reading the async routines seem to crash, so I'm
  3919. > looking for some sample code to do this.
  3920.  
  3921. There's a good article on writing async code in Develop. The article is
  3922. called something like Async Routines on the Macintosh by Jim Luther.
  3923.  
  3924. Without having any more details it's hard to guess what's wrong but, what
  3925. are you doing in your completion routine? There are a lot of limitations
  3926. on what can happen at interrupt time (ie. when your completion routine is
  3927. called). Try simply setting a flag from the completion routine and check
  3928. that flag in your event loop.
  3929.  
  3930. +++++++++++++++++++++++++++
  3931.  
  3932. >From David Gillies <daggilli@vader.brad.ac.uk>
  3933. Date: Thu, 28 Nov 1996 19:27:08 +0000
  3934. Organization: University of Bradford
  3935.  
  3936. Vince Darley wrote:
  3937. > I currently use the basic FSRead FSWrite .. routines with FSSpecs pointing
  3938. > to my files.  Since my output routines are very straightforward: I just
  3939. > create/over-write two files and keeping FSWrite'ing to them (always from
  3940. > the current position) and then set the EOF and close them, it struck me
  3941. > this would be a good situation to speed things up by writing
  3942. > asynchronously.
  3943. > However my attempts from reading the async routines seem to crash, so I'm
  3944. > looking for some sample code to do this.
  3945. > (none seems to be on apple's source sites, although I may have missed something)
  3946. > any help?,
  3947. Reading and writing asynchronously is best accomplished using
  3948. PBWriteAsync and PBReadAsync. But to do this you need to allocate
  3949. a separate ParamBlock for each call that is currently active (you
  3950. can re-use them of course, but it requires some fairly sophisticated
  3951. strategies to do this). If you have them referencing the same buffer
  3952. then you have to block (i.e. go into an idle loop) until calls have
  3953. finished. You lose most of the advantages of async this way. To really
  3954. make use of async IO you need multiple buffers, and managing them
  3955. becomes problematical, to say the least.
  3956.  
  3957. I can't give code on this one as the hair-tearing I underwent 
  3958. implementing this resulted in commercial-grade code. I am open to
  3959. offers, though (says he, hopefully).
  3960.  
  3961. Why, oh why, can't we have a threaded File Manager?
  3962. -- 
  3963. ______________________________________________________________________
  3964. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  3965.       University of Bradford, Bradford, West Yorkshire, England
  3966. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  3967.  
  3968. +++++++++++++++++++++++++++
  3969.  
  3970. >From Horst Pralow <h_pralow@overnet.de>
  3971. Date: Thu, 28 Nov 1996 20:08:08 +0000
  3972. Organization: overnet
  3973.  
  3974. > > 
  3975. > > However my attempts from reading the async routines seem to crash, so I'm
  3976. > > looking for some sample code to do this.
  3977. > > 
  3978. > MacTech Magazine has an article this month on exactly that topic.
  3979.  
  3980. Here's another gotcha you might keep in mind: If you happen to async-
  3981. read a file that has been compressed with AutoDoubler (and AutoDoubler
  3982. active) you'll run into trouble since AutoDoubler doesn't support
  3983. asynch reads on compressed files (At least the version I had this
  3984. trouble with.) This may be true for other compression engines too.
  3985. So always try a sync read in case your async one fails for non obviuous
  3986. reasons!
  3987.  
  3988.  
  3989. Horst
  3990.  
  3991. +++++++++++++++++++++++++++
  3992.  
  3993. >From squires@crl.com (Scott Squires)
  3994. Date: Mon, 02 Dec 1996 07:55:54 -0800
  3995. Organization: Puffin Designs
  3996.  
  3997. In article <329DE78C.6B21@vader.brad.ac.uk>,
  3998. David Gillies <daggilli@vader.brad.ac.uk> wrote:
  3999.  
  4000. >Vince Darley wrote:
  4001. >> 
  4002. >> I currently use the basic FSRead FSWrite .. routines with FSSpecs pointing
  4003. >> to my files.  Since my output routines are very straightforward: I just
  4004. >> create/over-write two files and keeping FSWrite'ing to them (always from
  4005. >> the current position) and then set the EOF and close them, it struck me
  4006. >> this would be a good situation to speed things up by writing
  4007. >> asynchronously.
  4008. >> 
  4009. >> However my attempts from reading the async routines seem to crash, so I'm
  4010. >> looking for some sample code to do this.
  4011. >> 
  4012. >> (none seems to be on apple's source sites, although I may have missed something)
  4013. >> 
  4014. >> any help?,
  4015. >> 
  4016. >Reading and writing asynchronously is best accomplished using
  4017. >PBWriteAsync and PBReadAsync. But to do this you need to allocate
  4018. >a separate ParamBlock for each call that is currently active (you
  4019. >can re-use them of course, but it requires some fairly sophisticated
  4020. >strategies to do this). If you have them referencing the same buffer
  4021. >then you have to block (i.e. go into an idle loop) until calls have
  4022. >finished. You lose most of the advantages of async this way. To really
  4023. >make use of async IO you need multiple buffers, and managing them
  4024. >becomes problematical, to say the least.
  4025.  
  4026.  
  4027. Check out the December issue of MacTech.  Async I/O and buffering.
  4028.  
  4029. -scott
  4030.  
  4031.  
  4032. Scott Squires               "Insert funny stuff here"
  4033. squires@crl.com
  4034. ScottSquir@aol.com
  4035.  
  4036.  
  4037. ---------------------------
  4038.  
  4039. End of C.S.M.P. Digest
  4040. **********************
  4041.